]> PHS Git Server - phs-api.git/commitdiff
Testing cloning path.
authorcharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 00:46:33 +0000 (19:46 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Sat, 6 Sep 2025 00:46:33 +0000 (19:46 -0500)
src/controllers/git.controller.js

index 45f371e2b7be1d6a93d596cd5dab52ad05a4a483..c9ed39591e7c27a398171e37e24ba501ad1aabb4 100755 (executable)
@@ -103,7 +103,7 @@ module.exports = {
     const conn = new Client();
     conn.on( 'ready', () => {
       console.log('ready');
-      const commands = [`mkdir -p ${ deployPath }`, `chown ${ user }:${ user } ${ deployPath }`, `su - ${ user } -c "cd ${ deployPath } && git clone ${ user }@localhost:/opt/git/${ repoName }.git ."`,];
+      const commands = [`mkdir -p ${ deployPath }`, `chown ${ user }:${ user } ${ deployPath }`, `cd ${ deployPath } && git clone ${ user }@localhost:/opt/git/${ repoName }.git .`,];
       console.log(commands);
       console.log([...commands].join( ' && ' ));
       conn.exec( commands.join( ' && ' ), ( err, stream ) => {