From: charleswrayjr Date: Fri, 5 Sep 2025 23:57:47 +0000 (-0500) Subject: Testing cloning path. X-Git-Url: https://git.phasecustomsoft.com/%7B%60$%7BAPI_BASE_URL%7D/file/$%7Bf.id%7D/view%60%7D?a=commitdiff_plain;h=f160db9b30a794cd2746760cfd847c1198805fbe;p=phs-api.git Testing cloning path. --- diff --git a/src/controllers/git.controller.js b/src/controllers/git.controller.js index 9d21f2a..84fe291 100755 --- a/src/controllers/git.controller.js +++ b/src/controllers/git.controller.js @@ -101,8 +101,9 @@ module.exports = { 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();