initial implementation of running node setup on branch switch in httpinterface

This commit is contained in:
Brenden Harrell committed 2021-10-01 08:39:30 -05:00
1 parent 978c6be82c
commit 90377568ac
4 files changed
+25 -40

No files matched your search

+22
View File
@@ -900,6 +900,28 @@ exports.newHttpInterface = function newHttpInterface() {
async function runNodeSetup () {
console.log( "lets run node setup" )
const path = require("path");
const process = require("process");
const { exec } = require("child_process");
let dir = path.join( process.cwd(), "..", ".." )
let command = "node setup";
exec( command,
{
cwd: dir
},
function ( error, stdout ){
if (error) {
console.log('');
console.log("There was an error updating dependencies for this branch: ");
console.log('');
console.log( error );
return;
}
console.log('');
console.log( stdout );
});
}
} catch (err) {