-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find Results.xml output file if current directory is changed. #1295
Comments
My proposed fix above does seem to work. I'll make a PR soon. |
After making my fix I was still getting another error:
I found out that this was because
So all of the top level actions and definitions in I found that this only happened in Debug mode and everything was fine in Release mode. Is this a known thing? It doesn't affect my original reported bug or the fix so I'll submit a PR. |
My test setup to reproduce this:
#r @"C:\Users\Prash\dev\FAKE\build\FakeLib.dll"
open Fake
open System.IO
buildServer |> printfn "%A"
Target "Testing" (fun _ ->
trace "1"
let orig = Directory.GetCurrentDirectory()
Directory.SetCurrentDirectory @"C:\"
trace "2"
Directory.SetCurrentDirectory orig
)
RunTargetOrDefault "Testing"
$env:CCNETLABEL = 1
C:\Users\Prash\dev\FAKE\build\FAKE.exe fake-test.fsx |
Description
Changing the current working directory breaks XML logging.
Repro steps
System.IO.Directory.SetCurrentDirectory
.Expected behavior
The log message is added to the file in the original location, regardless of the current directory.
Actual behavior
Throws:
Notes
The stack trace points here.
xmlOutputFile
comes from a parameter that defaults to a relative path. Turning this into an absolute path early on should fix the problem.The text was updated successfully, but these errors were encountered: