From 42dc18ddfc9bcc39707f87e6d9c739c2f924f2dd Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Fri, 30 Nov 2018 20:43:25 -0800 Subject: [PATCH] Avoid exiting when cmd is not found --- book/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/build.sh b/book/build.sh index 012607fa00..07d5aef1e6 100755 --- a/book/build.sh +++ b/book/build.sh @@ -16,8 +16,10 @@ maybe_cargo_install() { crate=$cmd fi + set +e "$cmd" --help > /dev/null 2>&1 declare exitcode=$? + set -e if [[ $exitcode -ne 0 ]]; then _ cargo install "$crate" fi