Skip to content

Commit

Permalink
Fix sprintf format in TemplateTests::getDebuggingInfo (fsprojects#2846)
Browse files Browse the repository at this point in the history
When looking at the remaining test failures when running on .NET 8 I noticed that some of the test error messages contained

...Debugging Info: Fake.DotNet.Cli.IntegrationTests.TemplateTests+getDebuggingInfo@58-2 Result: ...

and I think that '+getDebuggingInfo' is because the sprintf in getDebuggingInfo contains 3 %s but only two parameters, so it's actually being treated as a partially applied function by the string interpolcation in isProcessSucceeded rather than a string?

Looks like it's been like that for some time - not sure what the original intent was
  • Loading branch information
Numpsy authored Jan 8, 2025
1 parent 40a0fbd commit 83c7b22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/Fake.DotNet.Cli.IntegrationTests/TemplateTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let inline redirect () =

let getDebuggingInfo () =
sprintf
"%s\nDOTNET_ROOT: %s\nPATH: %s\n"
"\nDOTNET_ROOT: %s\nPATH: %s\n"
(Environment.GetEnvironmentVariable("DOTNET_ROOT"))
(Environment.GetEnvironmentVariable "PATH")

Expand Down

0 comments on commit 83c7b22

Please sign in to comment.