const conn = new Client();
conn.on( 'ready', () => {
- const commands = [`mkdir -p ${ deployPath }`, `chown ${ user }:${ user } ${ deployPath }`, `su - ${ user } -c "cd ${ deployPath } && git clone git@localhost:/opt/git/${ repoName }.git ."`,];
-
+ const commands = [`mkdir -p ${ deployPath }`, `chown ${ user }:${ user } ${ deployPath }`, `su - ${ user } -c "cd ${ deployPath } && git clone ${ user }@localhost:/opt/git/${ repoName }.git ."`,];
+ console.log(commands);
+ console.log([...commands].join( ' && ' ));
conn.exec( commands.join( ' && ' ), ( err, stream ) => {
if (err) {
conn.end();