]> PHS Git Server - phs-api.git/commitdiff
Testing cloning path.
authorcharleswrayjr <charleswrayjr@gmail.com>
Fri, 5 Sep 2025 23:57:47 +0000 (18:57 -0500)
committercharleswrayjr <charleswrayjr@gmail.com>
Fri, 5 Sep 2025 23:57:47 +0000 (18:57 -0500)
src/controllers/git.controller.js

index 9d21f2adecfc60d152424fe8d6ec1f8839fe50eb..84fe2916702611928a372e738ea3eaf07e966065 100755 (executable)
@@ -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();