mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Get tests working on node that requires shell arg
These silently fail on Windows after a recent change in node.js
This commit is contained in:
+6
-2
@@ -31,7 +31,6 @@ if (process.argv.length > 2) {
|
||||
}
|
||||
|
||||
const checkCoverage = flagArgs.indexOf('--coverage') >= 0;
|
||||
|
||||
if (checkCoverage) {
|
||||
flagArgs.splice(flagArgs.indexOf('--coverage'), 1);
|
||||
const executable = npmBinScript('nyc');
|
||||
@@ -44,6 +43,7 @@ if (checkCoverage) {
|
||||
{
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
env,
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
}
|
||||
);
|
||||
@@ -56,6 +56,7 @@ const run = cp.spawnSync(
|
||||
{
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
env,
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
}
|
||||
);
|
||||
@@ -64,4 +65,7 @@ function npmBinScript(script) {
|
||||
return path.resolve(__dirname, `../node_modules/.bin/` + (process.platform === 'win32' ? `${script}.cmd` : script));
|
||||
}
|
||||
|
||||
process.exit(run.status);
|
||||
if (run.error) {
|
||||
console.error(run.error);
|
||||
}
|
||||
process.exit(run.status ?? -1);
|
||||
|
||||
+5
-1
@@ -50,6 +50,7 @@ server.stdout.on('data', (data) => {
|
||||
[...testFiles, ...flagArgs], {
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
env,
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
}
|
||||
);
|
||||
@@ -61,7 +62,10 @@ server.stdout.on('data', (data) => {
|
||||
|
||||
server.kill();
|
||||
|
||||
process.exit(run.status);
|
||||
if (run.error) {
|
||||
console.error(run.error);
|
||||
}
|
||||
process.exit(run.status ?? -1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -40,12 +40,15 @@ async function run() {
|
||||
console.log(`\n\x1b[32m${command}\x1b[0m`, args);
|
||||
const run = cp.spawnSync(command, args, {
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
shell: true,
|
||||
stdio: 'inherit'
|
||||
}
|
||||
);
|
||||
if (run.status) {
|
||||
process.exit(run.status);
|
||||
|
||||
if (run.error) {
|
||||
console.error(run.error);
|
||||
}
|
||||
process.exit(run.status ?? -1);
|
||||
}
|
||||
}
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user