Skip to content

Commit

Permalink
explicitly pass process env to specmatic jar
Browse files Browse the repository at this point in the history
  • Loading branch information
StarKhan6368 committed Dec 10, 2024
1 parent 8359df9 commit a62c91d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function callJar(jarPath: string, args: string, done: (error: any) => void, onOu
argsList.push(`-DendpointsAPI="${process.env['endpointsAPI']}"`);
}
argsList = argsList.concat(['-jar', `"${jarPath}"`, args]);
const javaProcess: ChildProcess = spawn('java', argsList, { stdio: 'pipe', stderr: 'pipe', shell: true } as SpawnOptions);
const javaProcess: ChildProcess = spawn('java', argsList, { stdio: 'pipe', stderr: 'pipe', shell: true, env: process.env } as SpawnOptions);
javaProcess.stdout?.on('data', function (data: String) {
onOutput(`${data}`, false);
});
Expand Down

0 comments on commit a62c91d

Please sign in to comment.