Inject environment variables into getExecOutput()
This commit is contained in:
parent
1225bf2b8a
commit
99eb4e7d58
|
@ -361,7 +361,11 @@ class DotnetCoreInstaller {
|
|||
: DotnetCoreInstaller.installationDirectoryMac);
|
||||
}
|
||||
}
|
||||
const { exitCode, stdout } = yield exec.getExecOutput(`"${scriptPath}"`, scriptArguments, { ignoreReturnCode: true });
|
||||
const getExecOutputOptions = {
|
||||
ignoreReturnCode: true,
|
||||
env: process.env
|
||||
};
|
||||
const { exitCode, stdout } = yield exec.getExecOutput(`"${scriptPath}"`, scriptArguments, getExecOutputOptions);
|
||||
if (exitCode) {
|
||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
||||
}
|
||||
|
|
|
@ -244,10 +244,15 @@ export class DotnetCoreInstaller {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
const getExecOutputOptions = {
|
||||
ignoreReturnCode: true,
|
||||
env: process.env as {string: string}
|
||||
};
|
||||
const {exitCode, stdout} = await exec.getExecOutput(
|
||||
`"${scriptPath}"`,
|
||||
scriptArguments,
|
||||
{ignoreReturnCode: true}
|
||||
getExecOutputOptions
|
||||
);
|
||||
if (exitCode) {
|
||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
||||
|
|
Loading…
Reference in New Issue