You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After update to Fake.DotNet.CLI 5.21 and 5.21.1, DotNet.exec command runs from default location instead of the location where dotnet is executed from for fake run.
Repro steps
Having two scripts build.fsx and fantomas.fsx where the former calls the later as shown below:
build.fsx excerpt
Target.create "CheckCodeFormat" (fun _ ->
let r = DotNet.exec id "fake" "run fantomas.fsx -t CheckCodeFormat"
if not r.OK then failwith "fantomas CheckCodeFormat build script failed"
)
if checkCodeResult.ExitCode = 0 then
Trace.log "No files need formatting"
elif checkCodeResult.ExitCode = 99 then
failwith "Some files need formatting, check output for more info"
else
Trace.logf "Errors while formatting: %A" checkCodeResult.Errors)
Expected behavior
Fantomas should be started by the command below (dotnet located in hostedtoolcache, dotnet 6.0)
Description
After update to Fake.DotNet.CLI 5.21 and 5.21.1, DotNet.exec command runs from default location instead of the location where dotnet is executed from for fake run.
Repro steps
Having two scripts
build.fsx
andfantomas.fsx
where the former calls the later as shown below:build.fsx excerpt
Target.create "CheckCodeFormat" (fun _ ->
let r = DotNet.exec id "fake" "run fantomas.fsx -t CheckCodeFormat"
if not r.OK then failwith "fantomas CheckCodeFormat build script failed"
)
fantomas.fsx
Target.create "CheckCodeFormat" (fun _ ->
let checkCodeResult =
filesToCheckCodeOn
|> Seq.map (sprintf ""%s"")
|> String.concat " "
|> sprintf "%s --check"
|> DotNet.exec id "fantomas"
Expected behavior
Fantomas should be started by the command below (dotnet located in hostedtoolcache, dotnet 6.0)
D:\a\1\s> "C:\hostedtoolcache\windows/dotnet\dotnet.EXE" fake run fantomas.fsx -t CheckCodeFormat (In: false, Out: false, Err: false)
Actual behavior
Fantomas is started by the command below (dotnet located in Program Files, dotnet 5.0)
D:\a\1\s> "C:\Program Files\dotnet\dotnet.exe" fake run fantomas.fsx -t CheckCodeFormat (In: false, Out: false, Err: false)
Known workarounds
Use Fake.DotNet.CLI < 5.21
Related information
The text was updated successfully, but these errors were encountered: