Unitech / pm2-deploy

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

Strange bug on Windows #199

Open AlexRMU opened 2 years ago

AlexRMU commented 2 years ago

When I run pm2 deploy ... this appears:

--> Deploying to production environment
--> on host ...
/bin/bash: ...\node_modules\pm2-deploy\deploy: No such file or directory
Deploy failed
Deploy failed with exit code: 127

I dug around and realized that https://github.com/Unitech/pm2-deploy/blob/987428a6ce402b47bb195ab93a8eafa5ad79c6f5/deploy.js#L41 starts the bash process, which causes the error. When I tried to start the process from cmd, instead of launching deploy, the deploy.js file opens in notepad. I renamed deploy to deploy.sh. Now it outputs /bin/bash: ...\node_modules\pm2-deploy\deploy.sh: command not found And when I run all the arguments of this process, a bash window appears and nothing happens.