Skip to content

Commit c22db7b

Browse files
authored
updated script
enforced exit incase the user doesn't input in password
1 parent e29a124 commit c22db7b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

install.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
set -euxo pipefail #exit in case of errors
33

44
# install dependencies
5-
sudo apt update && sudo apt upgrade -y && sudo apt install -y git && sudo apt install -y gh && sudo apt install -y curl && sudo apt install -y nodejs && sudo apt install -y npm
5+
while true; do
6+
if sudo apt update && sudo apt upgrade -y && sudo apt install -y git && sudo apt install -y gh && sudo apt install -y curl && sudo apt install -y nodejs && sudo apt install -y npm; then
7+
echo
8+
break
9+
else
10+
echo -e "\xE2\x9D\x8C please input your password to proceed so that the setup runs successfully"
11+
exit 1
12+
fi
13+
done
614
echo
715
#Configures git
816
read -p $'\e[1mEnter Github username: \e[22m' username

0 commit comments

Comments
 (0)