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
Thanks for the report, this is indeed not supported at the moment, though we could pick it up and override the return code if Environment.ExitCode is different than 0. I am not sure if this will not break some edge cases though.
The alternative that you can use return 1; at any place in the top-level code of the script as behind the scenes it gets wrapped into method returning a status code.
if (Args[0] == "foo")
return 127;
Console.WriteLine("done");
An even quirkier thing is that you can just place an int (or a method call returning an int) at the end of the script, and that gets converted into a status code too (though that only works at the end)
I can set
Environment.ExitCode
properly, but it isn't respected when the script exits.Here's a simple reproduction:

The below works though.
The text was updated successfully, but these errors were encountered: