aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/win32.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/win32.js')
-rw-r--r--lib/compilers/win32.js18
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);
}