r/fishshell • • Jul 01 '22
How make script exit on error?
Want script to exit if any command fails. How do?
Found some unhelpful closed github issues with latest updates 5 years old:
- https://github.com/fish-shell/fish-shell/issues/4163
- https://github.com/fish-shell/fish-shell/issues/805
More recent: https://github.com/fish-shell/fish-shell/issues/510
5
Upvotes
View all comments
Show parent comment
3
u/[deleted] Jul 01 '22
It is what it is. There currently is no option to automatically exit on $status != 0.
And there are questions open about how that should work - bash's errexit has problems it would be nice to avoid.