gyro icon indicating copy to clipboard operation
gyro copied to clipboard

Gyro CLI always exits with '0' even if there's an error.

Open sshyub opened this issue 4 years ago • 0 comments

Describe the bug Gyro CLI always exits with '0' even if there's an error.

To Reproduce Give a wrong credential file in init.gyro, and run gyro up.

Expected behavior Gyro exited with '1' previously.

Additional context After gyro cli refactored with picocli, exception is handled by commandLine.setExecutionExceptionHandler(Gyro::invalidUserInput); in Gyro#init(), which always returns the status code, 2, but then it is even suppressed by Gyro#run().

Fixes should match the exit codes that are declared in the catch clauses in Gyro#main() function. Also the catch clauses in main should be removed if they are not used any more.

sshyub avatar Dec 11 '20 22:12 sshyub