From: charleswrayjr Date: Sat, 6 Sep 2025 01:00:27 +0000 (-0500) Subject: Testing create repo 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=c204f31fd130bd7163dcc7186c730fc78cd8e717;p=phs-api.git Testing create repo path. --- diff --git a/src/controllers/git.controller.js b/src/controllers/git.controller.js index 8efffc0..58de911 100755 --- a/src/controllers/git.controller.js +++ b/src/controllers/git.controller.js @@ -13,7 +13,8 @@ module.exports = { const conn = new Client(); conn.on( 'ready', () => { const commands = type === 'private' ? [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare`, `chown -R ${ user }:git /opt/git/${ name }.git`, `chmod -R u+rwX,go-rwx /opt/git/${ name }.git`,] : [`mkdir /opt/git/${ name }.git`, `cd /opt/git/${ name }.git`, `git init --bare --shared=group`, `chown -R git:git /opt/git/${ name }.git`, `chmod -R g+rwX /opt/git/${ name }.git`, `find /opt/git/${ name }.git -type d -exec chmod g+s {} \\;`, `git config core.sharedRepository group`,]; - + console.log( commands ); + console.log( [...commands].join( ' && ' ) ); conn.exec( `sudo -u git bash -c "${ commands.join( ' && ' ) }"`, ( err, stream ) => { if (err) { conn.end(); @@ -70,8 +71,6 @@ module.exports = { const conn = new Client(); conn.on( 'ready', () => { const command = `rm -rf /opt/git/${ name }.git`; - console.log(command); - console.log([...command].join( ' && ' )); conn.exec( command, ( err, stream ) => { if (err) { conn.end();