smoke: ctrl-c should kill all processes

This commit is contained in:
João Moreno
2021-07-06 20:29:04 +02:00
parent f4e48a92dd
commit 2c7fc24d63

View File

@@ -36,7 +36,13 @@ import { setup as setupLaunchTests } from './areas/workbench/launch.test';
const tmpDir = tmp.dirSync({ prefix: 't' }) as { name: string; removeCallback: Function; };
const testDataPath = tmpDir.name;
process.once('exit', () => rimraf.sync(testDataPath));
process.once('exit', () => {
try {
rimraf.sync(testDataPath);
} catch {
// noop
}
});
const [, , ...args] = process.argv;
const opts = minimist(args, {