shipit
shipit copied to clipboard
ssh-pool 5.2 and 5.3 duplicating '&&' on 'tar' comand ('&& && tar -xzf')
After update to version 5.2.0 or higher I can't make deploy cause the process break on tar comand:
Running "mkdir -p ~/folder/releases/20200324175447" on host "ip".
Running "cd ~/folder/releases/20200324175447 && && tar -xzf tmp-114681sp8i8x2jusj.tar.gz" on host "ip".
@ip-err bash: -c: line 0: syntax error near unexpected token '&&'
@ip-err bash: -c: line 0: 'cd ~/folder/releases/20200324175447 && && tar -xzf tmp-114681sp8i8x2jusj.tar.gz'
'deploy:update' errored after 20 s
Error: Command failed: ssh user@ip "cd ~/folder/releases/20200324175447 && && tar -xzf tmp-114681sp8i8x2jusj.tar.gz"
bash: -c: line 0: syntax error near unexpected token '&&'
bash: -c: line 0: 'cd ~/folder/releases/20200324175447 && && tar -xzf tmp-114681sp8i8x2jusj.tar.gz'
I'm using windows 10, running the command on the git bash, deploying to a ubuntu 14.04 server.
This is the info on my shipitfile.js:
module.exports = (shipit) => { require('shipit-deploy')(shipit);
shipit.initConfig({ default: { servers: 'user@ip', workspace: '/tmp/folder', repositoryUrl: '[email protected]:user/project.git', ignores: ['.git', 'node_modules'], keepReleases: 5, deleteOnRollback: true, shallowClone: true, yarn: { remote: true, }, }, develop: { deployTo: '~/folder', branch: 'branch', }, });
shipit.on('deployed', () => { shipit.start('pm2:restart'); });
shipit.blTask('pm2:restart', () => {
shipit.log('Restarting pm2');
shipit.remote(cd ${shipit.config.deployTo}/current && yarn && pm2 startOrRestart ecosystem.config.js
);
});
};
We're having the exact same issue.
A workaround is reinstall the packages with "resolutions" for "ssh-pool" on your package.json:
"resolutions": { "ssh-pool": "5.1.0" },
Hi, is this the same issue created by me https://github.com/shipitjs/shipit/issues/270?
Hi, is this the same issue created by me #270?
Yeah, same issue.
Oh, I see. I have put resolutions
in my package.json
, but still doesn't work. Any clue?
Oh, I see. I have put
resolutions
in mypackage.json
, but still doesn't work. Any clue?
Have you deleted node_modules folder and install the packages again?
Yes, I actually added resolution
before doing npm install --save-dev shipit-cli shipit-deploy
. Now I deleted node_modules
folder and installed deps again, issue remain.
bash: -c: line 0: syntax error near unexpected token
&&' bash: -c: line 0:
cd ~/colorsgroup/httpdocs/releases/20200612115230 && && tar -xzf tmp-8000Q6I637OV8eGa.tar.gz'
Open your node_modules folder, then look for the ssh-pool folder. Open it's package.json, if the resolutions works, the version should be 5.1.0.
I was using npm. Ends up that with npm doesn't support resolutions. With yarn it works. Temporary fix... please fix :)
Any update?