diff options
author | Nicole Mazzuca <npmazzuca@gmail.com> | 2018-07-30 14:18:46 -0700 |
---|---|---|
committer | Nicole Mazzuca <npmazzuca@gmail.com> | 2018-07-30 14:18:46 -0700 |
commit | 61ffd87e308852418d7775e943a9427c3a3f809d (patch) | |
tree | f51ab5742fb0d637cf7e13b3acab9a5200cf1d84 /lib/compilers/win32.js | |
parent | 615a6e6b2be9efe6823ae2e66bff2fa6381bfcaa (diff) | |
download | compiler-explorer-61ffd87e308852418d7775e943a9427c3a3f809d.tar.gz compiler-explorer-61ffd87e308852418d7775e943a9427c3a3f809d.zip |
allow wsl to support includePath
I have no idea how I'd make wine support includePath,
I'll leave it to someone else
Diffstat (limited to 'lib/compilers/win32.js')
-rw-r--r-- | lib/compilers/win32.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/compilers/win32.js b/lib/compilers/win32.js index 581a86af5..18cc66142 100644 --- a/lib/compilers/win32.js +++ b/lib/compilers/win32.js @@ -43,19 +43,19 @@ class Win32Compiler extends BaseCompiler { return false; } + setEnvVar(options, name, newVar) { + if (newVar) { + const oldVar = options.env[name] ? options.env[name] : ""; + options.env[name] = newVar + oldVar; + } + } + exec(compiler, args, options_) { let options = Object.assign({}, options_); options.env = Object.assign({}, options.env); - const setEnvVar = function (name, newVar) { - if (newVar) { - const oldVar = options.env[name] ? options.env[name] : ""; - options.env[name] = newVar + oldVar; - } - }; - - setEnvVar('INCLUDE', this.compiler.includePath); - setEnvVar('LIB', this.compiler.libPath); + this.setEnvVar(options, 'INCLUDE', this.compiler.includePath); + this.setEnvVar(options, 'LIB', this.compiler.libPath); return super.exec(compiler, args, options); } |