diff --git a/Platform/Client/httpInterface.js b/Platform/Client/httpInterface.js index 665402e61..dd933ba67 100644 --- a/Platform/Client/httpInterface.js +++ b/Platform/Client/httpInterface.js @@ -864,6 +864,9 @@ exports.newHttpInterface = function newHttpInterface() { await doGit() if (error === undefined) { + // Run node setup to prepare instance for branch change + await runNodeSetup() + // Return to UI that Branch is suggessfully changed SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse) } else { let docs = { @@ -896,6 +899,22 @@ exports.newHttpInterface = function newHttpInterface() { } } + async function runNodeSetup () { + console.log( "Running Node setup to adjust for new Branch" ) + const process = require("process"); + const { execSync } = require("child_process"); + + let dir = process.cwd() + let command = "node setup"; + let stdout = execSync( command, + { + cwd: dir + }).toString(); + + console.log("Node Setup has completed with the following result:", stdout) + + } + } catch (err) { console.log('[ERROR] httpInterface -> App -> Update -> Method call produced an error.') console.log('[ERROR] httpInterface -> App -> Update -> err.stack = ' + err.stack) diff --git a/Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js index bc35e0c59..defb3df07 100644 --- a/Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Education/UI/Spaces/Docs-Space/DocsSpace.js @@ -253,7 +253,9 @@ function newEducationDocSpace() { UI.projects.foundations.utilities.nodeConfig.saveConfigProperty(workspace.payload, 'currentBranch', branch) if (doNotNavigate === true) { return } + UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'Switching Branches - Current Branch Changed') + } else { UI.projects.education.spaces.docsSpace.navigateTo( data.docs.project,