cubical-demo icon indicating copy to clipboard operation
cubical-demo copied to clipboard

Use `set -e`

Open fredefox opened this issue 7 years ago • 3 comments

I believe you can use set -e rather rather than || exit 1

https://github.com/Saizan/cubical-demo/blob/f9f793cc925dcde1c84788a68eef5c53384627b7/test.sh#L1

fredefox avatar Jan 08 '18 16:01 fredefox

I'm terrible at scripting, what does that do?

Saizan avatar Jan 08 '18 16:01 Saizan

Exit on the first error :)

On Mon, Jan 8, 2018 at 5:41 PM, Andrea Vezzosi [email protected] wrote:

I'm terrible at scripting, what does that do?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Saizan/cubical-demo/issues/16#issuecomment-356021048, or mute the thread https://github.com/notifications/unsubscribe-auth/AEVklReM5wcJR_SRDA0K57kitAvfTP6yks5tIkVOgaJpZM4RWl7u .

-- Regards Frederik Hanghøj Iversen

fredefox avatar Jan 08 '18 16:01 fredefox

It also has the benefit of propagating the exit code rather than masking it with 1.

On Mon, Jan 8, 2018 at 5:42 PM, Frederik Hanghøj Iversen <[email protected]

wrote:

Exit on the first error :)

On Mon, Jan 8, 2018 at 5:41 PM, Andrea Vezzosi [email protected] wrote:

I'm terrible at scripting, what does that do?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Saizan/cubical-demo/issues/16#issuecomment-356021048, or mute the thread https://github.com/notifications/unsubscribe-auth/AEVklReM5wcJR_SRDA0K57kitAvfTP6yks5tIkVOgaJpZM4RWl7u .

-- Regards Frederik Hanghøj Iversen

-- Regards Frederik Hanghøj Iversen

fredefox avatar Jan 08 '18 16:01 fredefox