From 6e041e9eed6c29bfde2a04b2fa9d9aecb5d6e302 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Thu, 17 Mar 2022 19:53:51 +0100 Subject: [PATCH] isGeneratedScript TODO --- packages/api/src/controllers/runners.js | 4 ++-- packages/web/src/modals/ImportExportModal.svelte | 2 +- packages/web/src/tabs/ShellTab.svelte | 6 +++--- packages/web/src/utility/exportFileTools.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/api/src/controllers/runners.js b/packages/api/src/controllers/runners.js index 39f637ce..e7da9d8f 100644 --- a/packages/api/src/controllers/runners.js +++ b/packages/api/src/controllers/runners.js @@ -148,8 +148,8 @@ module.exports = { }, start_meta: true, - async start({ script }) { - if (process.env.DISABLE_SHELL) { + async start({ script, isGeneratedScript }) { + if (!isGeneratedScript && process.env.DISABLE_SHELL) { return { errorMessage: 'Shell is disabled' }; } diff --git a/packages/web/src/modals/ImportExportModal.svelte b/packages/web/src/modals/ImportExportModal.svelte index b6a763e3..fa820340 100644 --- a/packages/web/src/modals/ImportExportModal.svelte +++ b/packages/web/src/modals/ImportExportModal.svelte @@ -108,7 +108,7 @@ const script = await createImpExpScript($extensions, values); executeNumber += 1; let runid = runnerId; - const resp = await apiCall('runners/start', { script }); + const resp = await apiCall('runners/start', { script, isGeneratedScript: true }); runid = resp.runid; runnerId = runid; diff --git a/packages/web/src/tabs/ShellTab.svelte b/packages/web/src/tabs/ShellTab.svelte index ad15ad46..fe4089a4 100644 --- a/packages/web/src/tabs/ShellTab.svelte +++ b/packages/web/src/tabs/ShellTab.svelte @@ -37,9 +37,9 @@