edeliver / edeliver

Deployment for Elixir and Erlang
1.97k stars 185 forks source link

Return non-zero result when 'version' command fails #146

Open wanderanimrod opened 8 years ago

wanderanimrod commented 8 years ago

Hello there. Thank you for the great work on edeliver.

I have started using this in my ci pipeline but I have discovered that even if a command fails, the result code in bash is 0. This makes most ci servers think the task was successful yet it actually failed.

I think non-zero codes should be returned when the following commands fail:

Is this something reasonable to add, or is there a reason things are the way they are? I am happy to submit a patch if it is a reasonable thing to add.

Thank you.

lessless commented 7 years ago

Why was this issue closed? Returning non-zero exit code on failure is expected behaviour

wanderanimrod commented 7 years ago

I have been trying to remember why I closed the issue and I have failed to. I should have added the reason before closing it. I have re-opened it assuming the version command is still exiting with 0 even when it fails to get the version.

lessless commented 7 years ago

Just checked ping yesterday and it returns 0 even if host is unreachable. Could you find a location of ping/version commands source code?

On Nov 2, 2016 12:41 AM, "Nimrod Wandera" notifications@github.com wrote:

I have been trying to remember why I closed the issue and I have failed to. I should have added the reason before closing it. I have re-opened it assuming the version command is still exiting with 0 even when it fails to get the version.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boldpoker/edeliver/issues/146#issuecomment-257636292, or mute the thread https://github.com/notifications/unsubscribe-auth/ABd9zNfD4EBBWXrt1o2g7Vted5I_a0Eeks5q53nJgaJpZM4JkFj8 .

onelesd commented 6 years ago

Just adding to the list of commands that should propagate non-zero when called from the build and deploy edeliver commands:

wanderanimrod commented 6 years ago

@onelesd , I would say all commands should propagate non-zero.