Skip to content

Commit

Permalink
make installation command checks more thorough
Browse files Browse the repository at this point in the history
  • Loading branch information
komaeda committed Mar 28, 2019
1 parent c6765eb commit 1b3469f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo "Let's get you set up with Rustlings!"

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

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

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

0 comments on commit 1b3469f

Please sign in to comment.