initial implementation of running node setup on branch switch in httpinterface
This commit is contained in:
1 parent
978c6be82c
commit
90377568ac
4 files changed
+25
-40
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user