aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/WSL-CL.js
diff options
context:
space:
mode:
authorRabsRincon <rubrinbla@gmail.com>2017-12-19 13:18:13 +0100
committerRabsRincon <rubrinbla@gmail.com>2017-12-19 13:18:13 +0100
commit13032aff606de2a873f51c491d3d51c9da4df6e1 (patch)
treeb1af0979b915e9f7116033bf0b18ccce30dd23b6 /lib/compilers/WSL-CL.js
parent90db96ae802d1806bc7c59bf00fbafb622a62b0d (diff)
downloadcompiler-explorer-13032aff606de2a873f51c491d3d51c9da4df6e1.tar.gz
compiler-explorer-13032aff606de2a873f51c491d3d51c9da4df6e1.zip
Constify WSL-CL.js
Fixed possible type coercion where it's not needed
Diffstat (limited to 'lib/compilers/WSL-CL.js')
-rw-r--r--lib/compilers/WSL-CL.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/compilers/WSL-CL.js b/lib/compilers/WSL-CL.js
index 654b0011c..4582e546b 100644
--- a/lib/compilers/WSL-CL.js
+++ b/lib/compilers/WSL-CL.js
@@ -28,17 +28,16 @@
// Don't run under Wine (obviously)
// Translate compiler path from Unix mounted volume (/mnt/c/tmp) to Windows (c:/tmp)
-var Compile = require('../base-compiler'),
+const Compile = require('../base-compiler'),
asm = require('../asm-cl'),
- logger = require('../logger').logger,
temp = require('temp');
function compileCl(info, env) {
- var compile = new Compile(info, env);
+ const compile = new Compile(info, env);
compile.asm = new asm.AsmParser(env.compilerProps);
info.supportsFiltersInBinary = true;
- if (process.platform == "linux") {
- var origExec = compile.exec;
+ if (process.platform === "linux") {
+ const origExec = compile.exec;
compile.exec = function (command, args, options) {
return origExec(command, args, options);
};
@@ -46,9 +45,9 @@ function compileCl(info, env) {
// AP: Need to translate compiler paths from what the Node.js process sees
// on a Unix mounted volume (/mnt/c/tmp) to what CL sees on Windows (c:/tmp)
// We know process.env.tmpDir is of format /mnt/X/dir where X is drive letter.
- var driveLetter = process.env.winTmp.substring(5, 6);
- var directoryPath = process.env.winTmp.substring(7);
- var windowsStyle = driveLetter.concat(":/", directoryPath);
+ const driveLetter = process.env.winTmp.substring(5, 6);
+ const directoryPath = process.env.winTmp.substring(7);
+ const windowsStyle = driveLetter.concat(":/", directoryPath);
return fn.replace(process.env.winTmp, windowsStyle);
};
}