Fixed broken pipe race condition in ensure_installed
This commit is contained in:
committed by
Benjamin Bouvier
parent
c0274eca24
commit
3c6795decf
@@ -55,7 +55,7 @@ ensure_installed() {
|
||||
program="$1"
|
||||
toolchain="${2:-stable}"
|
||||
if has_toolchain $toolchain; then
|
||||
if cargo +$toolchain install --list | grep -q $program; then
|
||||
if grep -q $program <(cargo +$toolchain install --list); then
|
||||
echo "$program found"
|
||||
else
|
||||
echo "installing $program"
|
||||
|
||||
Reference in New Issue
Block a user