test: add path to nodeJs when running test:bin
- this allows the test to be run in a debugger without the complete PATH
This commit is contained in:
committed by
Nils Knappmeier
parent
d337f40d0e
commit
187d611e8c
+8
-1
@@ -1,6 +1,7 @@
|
||||
const childProcess = require('child_process');
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
|
||||
const chai = require('chai');
|
||||
chai.use(require('chai-diff'));
|
||||
@@ -37,7 +38,13 @@ function executeBinHandlebars(...args) {
|
||||
}
|
||||
|
||||
function execFilesSyncUtf8(command, args) {
|
||||
return childProcess.execFileSync(command, args, { encoding: 'utf-8' });
|
||||
const env = process.env;
|
||||
env.PATH = addPathToNodeJs(env.PATH);
|
||||
return childProcess.execFileSync(command, args, { encoding: 'utf-8', env });
|
||||
}
|
||||
|
||||
function addPathToNodeJs(pathEnvironment) {
|
||||
return path.dirname(process.argv0) + path.delimiter + pathEnvironment;
|
||||
}
|
||||
|
||||
function normalizeCrlf(string) {
|
||||
|
||||
Reference in New Issue
Block a user