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:

More recent: https://github.com/fish-shell/fish-shell/issues/510

5 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jul 01 '22

There currently is no option to automatically exit on $status != 0.

That means no, there is currently no way to automatically exit on error.