SharpGen
SharpGen copied to clipboard
Pass through the CommandLineApplication return code
Before applying this change SharpGen was always returning 0 on my system.
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?
bump @dcsync
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