4
1
I have script that used curl
when i pass wrong parameters to script curl failed but script continue executing.
I have tried use curl -f/--fail
parameter but problem does not solved.
What is the best way to stop script?
I have founded my mistake.
I used curl
command into another command
echo `curl --fail ... || exit 1`
After removing echo command curl become working properly. Thank you for answer, it is also useful.
2
check for curl's exit code, also duplicate of http://stackoverflow.com/questions/3822621/how-to-exit-if-a-command-failed
– Jasper – 2014-04-16T11:44:04.057