Skip to content

Conversation

@dcsync
Copy link

@dcsync dcsync commented Nov 12, 2018

Before applying this change SharpGen was always returning 0 on my
system.

Before applying this change SharpGen was always returning 0 on my
system.
@cobbr
Copy link
Owner

cobbr commented Dec 12, 2018

Hey @dcsync, thanks for the pull! (And sorry for the delayed response)

I was playing around with this, and I am still always getting a 0 exit code, even with your changes. Could you provide an example of when this is not the case?

@cobbr
Copy link
Owner

cobbr commented Mar 11, 2019

bump @dcsync

@dcsync
Copy link
Author

dcsync commented Apr 22, 2019

Hey @cobbr, does it return 0 on your system when invalid arguments are passed? Here's how I'm testing it:

$ dotnet --version
2.2.105
$ dotnet ./bin/Debug/netcoreapp2.1/SharpGen_original.dll ; echo "exit code: $?"
The --file field is required.
Specify --help for a list of available options and commands.
exit code: 0

Before returning the exit code of app.Execute() it would always return 0 on build failures and when invalid arguments were passed. After patching it I was able to get non-zero exit codes:

$ dotnet ./bin/Debug/netcoreapp2.1/SharpGen_patched.dll ; echo "exit code: $?"
The --file field is required.
Specify --help for a list of available options and commands.
exit code: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants