Avoid exiting when cmd is not found
This commit is contained in:
parent
801df72680
commit
42dc18ddfc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue