Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

ssh-pool 5.2 and 5.3 duplicating '&&' on 'tar' comand ('&& && tar -xzf') #268

Open
rootedy-ffit opened this issue Mar 24, 2020 · 10 comments
Labels

Comments

@rootedy-ffit
Copy link

rootedy-ffit commented Mar 24, 2020

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: 'git@bitbucket.org: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);
});
};

@datagrams
Copy link

We're having the exact same issue.

@rootedy-ffit
Copy link
Author

A workaround is reinstall the packages with "resolutions" for "ssh-pool" on your package.json:

"resolutions": { "ssh-pool": "5.1.0" },

@gregberge gregberge added the bug label Apr 5, 2020
@gremo
Copy link

gremo commented Jun 12, 2020

Hi, is this the same issue created by me #270?

@rootedy-ffit
Copy link
Author

Hi, is this the same issue created by me #270?

Yeah, same issue.

@gremo
Copy link

gremo commented Jun 12, 2020

Oh, I see. I have put resolutions in my package.json, but still doesn't work. Any clue?

@rootedy-ffit
Copy link
Author

Oh, I see. I have put resolutions in my package.json, but still doesn't work. Any clue?

Have you deleted node_modules folder and install the packages again?

@gremo
Copy link

gremo commented Jun 12, 2020

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'

@rootedy-ffit
Copy link
Author

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.

@gremo
Copy link

gremo commented Jun 12, 2020

I was using npm. Ends up that with npm doesn't support resolutions. With yarn it works. Temporary fix... please fix :)

@gremo
Copy link

gremo commented Jun 21, 2020

Any update?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

5 participants
@gregberge @gremo @rootedy-ffit @datagrams and others