From 7319ea062dc0cf14c99b1f9480dc3650a421bb25 Mon Sep 17 00:00:00 2001 From: jkaplon Date: Wed, 8 Apr 2020 17:09:03 -0400 Subject: [PATCH] Add uid param to child_process.exec call --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index fa09fc7..8ca493d 100644 --- a/server.js +++ b/server.js @@ -147,7 +147,7 @@ io.on('connection', function(socket){ git merge ${now} `; //winston.info(cmd); - exec(cmd, function(error, stdout, stderr) { + exec(cmd, { uid: 1000 }, function(error, stdout, stderr) { if (error) { winston.error(error); } if (!stdout.includes('CONFLICT')) { // Case-sensitivity seems brittle here. Better to check return code rather than stdout? Can child_process be called w/signature to include return code? var cmd2 = `cd ${noteDir} && git branch -d ${now}`