From 71af75022744ccd8d0cc338bf64f23655efb77a6 Mon Sep 17 00:00:00 2001 From: Mats Larsen Date: Fri, 24 Sep 2021 01:37:39 +0100 Subject: [PATCH] Warn if Execution Only is added for compiler without execution (#2962) Shows a warning in the alert system and cancels the execution request if the compiler does not support execution. --- static/panes/executor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/panes/executor.js b/static/panes/executor.js index c5fb4cde7..eb0460374 100644 --- a/static/panes/executor.js +++ b/static/panes/executor.js @@ -218,6 +218,12 @@ Executor.prototype.compile = function (bypassCache) { }; Executor.prototype.compileFromEditorSource = function (options, bypassCache) { + if (!this.compiler.supportsExecute) { + this.alertSystem.notify('This compiler (' + this.compiler.name + ') does not support execution', { + group: 'execution', + }); + return; + } this.compilerService.expand(this.source).then(_.bind(function (expanded) { var request = { source: expanded || '',