Skip to content

Commit

Permalink
Dash needs to be at first or last place in the regex else it does not…
Browse files Browse the repository at this point in the history
… work correctly
  • Loading branch information
taniman committed Nov 9, 2018
1 parent 1a27e2d commit 0688bdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update.sh
Expand Up @@ -143,7 +143,7 @@ if [[ "$skipsetup" == "n" ]] || [[ "$skipsetup" == "N" ]]; then
### ask user for the name and path of each instance they wish to update ###
for ((i=1; i<=$PTinstances; i++)); do
read -p "What is the PM2 App name/ id or pid for instance $i? " name[$i]
chars="a-zA-Z0-9_-\/"
chars="a-zA-Z0-9_\/-"
re="\/[$chars]+"
execpath=$(pm2 info "${name[$i]}" | grep 'exec cwd');
if [[ $execpath =~ $re ]];
Expand Down

0 comments on commit 0688bdf

Please sign in to comment.