Skip to content

Commit 6753c33

Browse files
committed
resolved 'print command' verbosity & npm i errors
1 parent 079154e commit 6753c33

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

install.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
set -euxo pipefail #exit in case of errors
2+
set -euo pipefail #exit in case of errors
33

44
# install dependencies
55
while true; do
@@ -8,30 +8,34 @@ while true; do
88
if [ $(uname -s) == Linux ]; then
99
echo -e "\xE2\x9D\x8C please input your password to proceed so that the setup runs successfully"
1010
echo
11+
1112
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
1213
echo
1314
break
1415
else
1516
echo -e "\xE2\x9D\x8C please input your password to proceed so that the setup runs successfully"
16-
exit 1
17+
return
1718
fi
1819
echo
1920
break
21+
2022
elif
2123
[ $(uname -s) == Darwin ]; then
2224
if brew update && brew upgrade && brew install git && brew install gh && brew install curl && brew install node && brew install npm; then
23-
echo
24-
break
25+
echo
26+
break
2527
else
26-
exit 1
28+
return
2729
fi
2830
echo
2931
break
32+
3033
elif [ $(uname -s) == CYGWIN || $(uname -s) ==* ]; then
3134
echo "CYGWIN is not yet supported"
3235
else
3336
exit
3437
fi
38+
3539
done
3640
echo
3741
#Configures git
@@ -62,7 +66,7 @@ This app will be installed on your test repository at https://github.com/$userna
6266
Since the app may be used to test a lot of use cases, ensure that all the access permissions are set to \e[1mRead and Write\e[22m and or all checkboxes are marked.\e[39m'
6367

6468
echo -e '\e[91mEnsure that you supply a Webhook URL and Webhook Secret for your new app.\e[39m'
65-
echo -e '\e[38;5;42mFor the Webhook URL, visit https://smee.io, copy and paste the URL to the \eWebhook URL section of the app\e[22m and also to the prompt below.\e[39m'
69+
echo -e '\e[38;5;42mFor the Webhook URL, visit https://smee.io, copy and paste the URL to the \e[1mWebhook URL section of the app\e[22m and also to the prompt below.\e[39m'
6670
echo
6771

6872
#create temporary env file
@@ -76,9 +80,9 @@ read -p $'\e[1mEnter Webhook URL: \e[22m' webhookurl
7680
while true; do
7781

7882
if grep -q "200" <<< "$(curl -Is $webhookurl | head -1)" ; then
79-
echo -e "\xE2\x9C\x94 \e[1m\e[38;5;42m$webhookurl\e[39m is up and running\e[22m"
80-
echo
81-
break
83+
echo -e "\xE2\x9C\x94 \e[1m\e[38;5;42m$webhookurl\e[39m is up and running\e[22m"
84+
echo
85+
break
8286
else
8387
echo -e "\xE2\x9D\x8C \e[1m\e[91m$webhookurl\e[39m is not responsive as intended.
8488
Please provide a working Webhook URL as pasted in your GitHub App settings from https://smee.io \e[22m"
@@ -147,6 +151,6 @@ echo -e "\xE2\x9C\x94 moved to badging-bot directory"
147151
mv ../.env . && rm -rf ../.env
148152
echo -e "\xE2\x9C\x94 moved .env file to badging-bot directory"
149153

150-
npx -y husky-init && npm ci
154+
npx -y husky-init && npm i
151155

152156
npm run dev

0 commit comments

Comments
 (0)