mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
shell scripts blocked by default only when listen-api
This commit is contained in:
parent
773abc6dff
commit
53e5f1378c
@ -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'),
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user