Unitech / pm2-deploy

Deploy part of PM2
http://pm2.keymetrics.io/docs/usage/deployment/
MIT License
178 stars 71 forks source link

pre-setup can't be a local script in zsh #191

Closed nkronlage closed 3 years ago

nkronlage commented 3 years ago

Setting "pre-setup" to a local script is not working on MacOS with zsh.

The problem appears to be here:

local is_script=($cmd)
if [ -f "${is_script[0]}" ]; then

On zsh, arrays indices start at 1 so "is_script[0]" returns an empty string and it skips this part of the if.

nkronlage commented 3 years ago

Closing, I was not on the most recent version.