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.
This commit is contained in:
Mats Larsen
2021-09-24 02:37:39 +02:00
committed by GitHub
parent 06d636e2dc
commit 71af750227
+6
View File
@@ -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 || '',