We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fb9071 commit 059405cCopy full SHA for 059405c
node/mock-test.ts
@@ -66,6 +66,12 @@ export class MockTestRunner {
66
nodePath = this.getNodePath(nodeVersion);
67
}
68
let spawn = cp.spawnSync(nodePath, [this._testPath]);
69
+ // Clean environment
70
+ Object.keys(process.env)
71
+ .filter(key => (key.substr(0, 'INPUT_'.length) === 'INPUT_' ||
72
+ key.substr(0, 'SECRET_'.length) === 'SECRET_' ||
73
+ key.substr(0, 'VSTS_TASKVARIABLE_'.length) === 'VSTS_TASKVARIABLE_'))
74
+ .forEach(key => delete process.env[key]);
75
if (spawn.error) {
76
console.error('Running test failed');
77
console.error(spawn.error.message);
0 commit comments