Run Node Setup on Branch Switch Initial

This commit is contained in:
Brenden Harrell committed 2021-09-26 21:04:42 -05:00
1 parent 15fd95bb19
commit bf17265ac0
1 file changed
+18
@@ -254,6 +254,24 @@ function newEducationDocSpace() {
if (doNotNavigate === true) { return }
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'Switching Branches - Current Branch Changed')
// Run Node Setup to Update dependencies upon branch switch
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 );
});
} else {
UI.projects.education.spaces.docsSpace.navigateTo(
data.docs.project,