-
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
When calling FAKE from powershell, it runs successfully then exits with an error #1187
Comments
It doesn't show an error. What's fake's exit code?
|
Sorry, I'm on vacation for the next two weeks, but my guess is that it is related to stderr. I think when in prowershell Since the exception message is empty, my blind guess is that on exit, FAKE flushes some kind of buffer and writes an empty message to stderr, causing powershell to throw. Edit The exit code is 0 (checked with procmon) I have a repro here: https://github.com/0x53A/fake-issue-1187 The issue seems to be related to output redirection, when running the script normally in powershell, it worked WITHOUT an error, but when running it in powershell-ise or with redirection |
[Fix #1187] Only write to STDERR if an error happened
Err, is there a way of knowing whether this fix has made it to the package available on nuget.org? I am just checking out FAKE, running through the starter example, and the build.ps1/bat script fails with exactly this error if run from the PowerShell console in Visual Studio. That is as of today, 1 Aug 2016, fake reports version 4.36.0. |
I think the pr #1210 was included in 4.23.6 Also if you look at the pr comments, @matthid mentions that the same issue might happen in other code-paths, maybe you just hit a different one than me. Regarding powershell, I don't think it is possible to detect |
I think the issue is reintroduced in version 4.48.0. It works fine in 4.47.4 but when upgraded powershell throws exception despite successfully executing FAKE script |
Another way would be to check for an empty string here: https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/TraceListener.fs#L59 instead of the call-site as in #1210 |
FAKE Version:
This powershell script
Runs successfully and then exits with an error:
This behaviour does not occur with
'FAKE 4.7.2'.
The text was updated successfully, but these errors were encountered: