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
|
crate=$cmd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set +e
|
||||||
"$cmd" --help > /dev/null 2>&1
|
"$cmd" --help > /dev/null 2>&1
|
||||||
declare exitcode=$?
|
declare exitcode=$?
|
||||||
|
set -e
|
||||||
if [[ $exitcode -ne 0 ]]; then
|
if [[ $exitcode -ne 0 ]]; then
|
||||||
_ cargo install "$crate"
|
_ cargo install "$crate"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue