Skip to content

Commit 1b3469f

Browse files
committed
make installation command checks more thorough
1 parent c6765eb commit 1b3469f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
echo "Let's get you set up with Rustlings!"
44

55
echo "Checking requirements..."
6-
if [ -x "$(git)" ]
6+
if [ -x "$(command -v git)" ]
77
then
88
echo "WARNING: Git does not seem to be installed."
99
echo "Please download Git using your package manager or over https://git-scm.com/!"
@@ -12,7 +12,7 @@ else
1212
echo "SUCCESS: Git is installed"
1313
fi
1414

15-
if [ -x "$(rustc)" ]
15+
if [ -x "$(command -v rustc)" ]
1616
then
1717
echo "WARNING: Rust does not seem to be installed."
1818
echo "Please download Rust using https://rustup.rs!"
@@ -21,7 +21,7 @@ else
2121
echo "SUCCESS: Rust is installed"
2222
fi
2323

24-
if [ -x "$(cargo)" ]
24+
if [ -x "$(command -v cargo)" ]
2525
then
2626
echo "WARNING: Cargo does not seem to be installed."
2727
echo "Please download Rust and Cargo using https://rustup.rs!"

0 commit comments

Comments
 (0)