Revert "start implementing shell command utility"

This reverts commit 61ec81e092.
This commit is contained in:
Brenden Harrell committed 2021-10-01 07:10:56 -05:00
1 parent 32dd328112
commit 3442442017
3 files changed
+23 -41

No files matched your search

@@ -18,11 +18,9 @@ function newEducationActionSwitch() {
async function executeAction(action) {
switch (action.name) {
case 'Launch Shell Command':
{
UI.projects.education.functionLibraries.launchshellcommand.launchshellcommand(action.node)
}
break
case 'Action Name': {
// Example: return UI.projects.foundations.functionLibraries.onFocus.getNodeThatIsOnFocus(action.node)
}
}
}
}
@@ -1,34 +0,0 @@
const path = require("path");
const process = require("process");
const { exec } = require("child_process");
function newEducationFunctionLibraryLaunchShellCommand() {
let thisObject = {
launchShellCommand: launchShellCommand
}
return thisObject
function launchShellCommand() {
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 );
});
}
}
@@ -244,6 +244,9 @@ function newEducationDocSpace() {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'Switching Branches - Changing Current Branch')
}
const path = require("path");
const process = require("process");
const { exec } = require("child_process");
function onResponse(err, data) {
/* Lets check the result of the call through the http interface */
data = JSON.parse(data)
@@ -255,9 +258,24 @@ function newEducationDocSpace() {
if (doNotNavigate === true) { return }
// 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;
}
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'Switching Branches - Current Branch Changed')
console.log('');
console.log( stdout );
});
} else {
UI.projects.education.spaces.docsSpace.navigateTo(
data.docs.project,