diff options
Diffstat (limited to 'lib/compilers/nim.js')
-rw-r--r-- | lib/compilers/nim.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/compilers/nim.js b/lib/compilers/nim.js index c24c8da1f..8a7745fe6 100644 --- a/lib/compilers/nim.js +++ b/lib/compilers/nim.js @@ -47,10 +47,6 @@ class NimCompiler extends BaseCompiler { } filterUserOptions(userOptions) { - return userOptions.filter(option => !['--run', '-r'].includes(option)); - } - - runCompiler(compiler, options, inputFilename, execOptions) { //Allowed commands const commands = [ "compile", "compileToC", "c", @@ -61,11 +57,11 @@ class NimCompiler extends BaseCompiler { ]; //If none of the allowed commands is present in userOptions compile to C++ - if (_.intersection(options, commands).length === 0) { - options.unshift("compileToCpp"); + if (_.intersection(userOptions, commands).length === 0) { + userOptions.unshift("compileToCpp"); } - return super.runCompiler(compiler, options, inputFilename, execOptions); + return userOptions.filter(option => !['--run', '-r'].includes(option)); } postProcess(result, outputFilename, filters) { |