diff --git a/packages/api/src/controllers/runners.js b/packages/api/src/controllers/runners.js index 0430dfab..06f72b5f 100644 --- a/packages/api/src/controllers/runners.js +++ b/packages/api/src/controllers/runners.js @@ -104,6 +104,7 @@ module.exports = { scriptFile, [ '--checkParent', // ...process.argv.slice(3) + '--is-forked-api', ...processArgs.getPassArgs(), ], { diff --git a/packages/api/src/proc/index.js b/packages/api/src/proc/index.js index b6f0be5a..af4e9fe0 100644 --- a/packages/api/src/proc/index.js +++ b/packages/api/src/proc/index.js @@ -3,6 +3,7 @@ const databaseConnectionProcess = require('./databaseConnectionProcess'); const serverConnectionProcess = require('./serverConnectionProcess'); const sessionProcess = require('./sessionProcess'); const jslDatastoreProcess = require('./jslDatastoreProcess'); +const sshForwardProcess = require('./sshForwardProcess'); module.exports = { connectProcess, @@ -10,4 +11,5 @@ module.exports = { serverConnectionProcess, sessionProcess, jslDatastoreProcess, + sshForwardProcess, }; diff --git a/packages/api/src/utility/directories.js b/packages/api/src/utility/directories.js index 5f6de8ec..b27202f5 100644 --- a/packages/api/src/utility/directories.js +++ b/packages/api/src/utility/directories.js @@ -8,7 +8,7 @@ const processArgs = require('./processArgs'); const createDirectories = {}; const ensureDirectory = (dir, clean) => { if (!createDirectories[dir]) { - if (clean && fs.existsSync(dir)) { + if (clean && fs.existsSync(dir) && !platformInfo.isForkedApi) { console.log(`Cleaning directory ${dir}`); cleanDirectory(dir); }