diff --git a/packages/api/src/utility/platformInfo.js b/packages/api/src/utility/platformInfo.js index 77143ef1..393edbfa 100644 --- a/packages/api/src/utility/platformInfo.js +++ b/packages/api/src/utility/platformInfo.js @@ -39,8 +39,8 @@ const platformInfo = { environment: process.env.NODE_ENV, platform, runningInWebpack: !!process.env.WEBPACK_DEV_SERVER_URL, - allowShellConnection: !!process.env.SHELL_CONNECTION || !!isElectron(), - allowShellScripting: !!process.env.SHELL_SCRIPTING || !!isElectron(), + allowShellConnection: !processArgs.listenApiChild || !!process.env.SHELL_CONNECTION || !!isElectron(), + allowShellScripting: !processArgs.listenApiChild || !!process.env.SHELL_SCRIPTING || !!isElectron(), defaultKeyfile: path.join(os.homedir(), '.ssh/id_rsa'), }; diff --git a/packages/api/src/utility/processArgs.js b/packages/api/src/utility/processArgs.js index d199237b..68514c79 100644 --- a/packages/api/src/utility/processArgs.js +++ b/packages/api/src/utility/processArgs.js @@ -12,6 +12,7 @@ const isForkedApi = process.argv.includes('--is-forked-api'); const pluginsDir = getNamedArg('--plugins-dir'); const workspaceDir = getNamedArg('--workspace-dir'); const listenApi = process.argv.includes('--listen-api'); +const listenApiChild = process.argv.includes('--listen-api-child') || listenApi; function getPassArgs() { const res = []; @@ -21,6 +22,9 @@ function getPassArgs() { if (global['PLUGINS_DIR']) { res.push('--plugins-dir', global['PLUGINS_DIR']); } + if (listenApiChild) { + res.push('listen-api-child'); + } return res; } @@ -32,4 +36,5 @@ module.exports = { pluginsDir, workspaceDir, listenApi, + listenApiChild, };