Skip to content

Commit

Permalink
fix: prevent silent error if .zshrc file doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Aug 18, 2024
1 parent 7d4195c commit 587042c
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Ask lighthouse-plugin-ecoindex version installed localy launched..."
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# must be the last row
npm list -g | grep lighthouse-plugin-ecoindex | grep -Eo '[0-9]{1,}.[0-9]{1,}.[0-9]{1,}'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Ask lighthouse-plugin-ecoindex version avalable on registry launched..."
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# must be the last row
npm view lighthouse-plugin-ecoindex version
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Ask node -v launched..."
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# must be the last row
node -v
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Ask which node launched..."
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# must be the last row
which node
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Install plugin Lighthouse-ecoindex launched 🚀"
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# echo "which node : $(which node)"
# echo "which npm : $(which npm)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Install puppeteer browser launched 🚀"
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# echo "which node : $(which node)"
# echo "which npm : $(which npm)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "Update plugin launched 🚀"
unset npm_config_prefix > /dev/null 2>&1
source ~/.zshrc > /dev/null 2>&1
[[ -f ~/.zshrc ]] && source ~/.zshrc > /dev/null 2>&1

# echo "which node : $(which node)"
# echo "which npm : $(which npm)"
Expand Down

0 comments on commit 587042c

Please sign in to comment.