mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-23 00:50:19 +00:00
Inject environment variables into getExecOutput()
This commit is contained in:
parent
1225bf2b8a
commit
99eb4e7d58
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -361,7 +361,11 @@ class DotnetCoreInstaller {
|
|||||||
: DotnetCoreInstaller.installationDirectoryMac);
|
: 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) {
|
if (exitCode) {
|
||||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
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(
|
const {exitCode, stdout} = await exec.getExecOutput(
|
||||||
`"${scriptPath}"`,
|
`"${scriptPath}"`,
|
||||||
scriptArguments,
|
scriptArguments,
|
||||||
{ignoreReturnCode: true}
|
getExecOutputOptions
|
||||||
);
|
);
|
||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
throw new Error(`Failed to install dotnet ${exitCode}. ${stdout}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user