mirror of
https://github.com/actions/setup-python.git
synced 2025-12-17 05:52:37 +00:00
Extend PKG_CONFIG path rather than overwriting it
This commit is contained in:
parent
cfd55ca824
commit
87c35f43f0
5 changed files with 51 additions and 5 deletions
14
src/utils.ts
14
src/utils.ts
|
|
@ -422,3 +422,17 @@ export function getDownloadFileName(downloadUrl: string): string | undefined {
|
|||
? path.join(tempDir, path.basename(downloadUrl))
|
||||
: undefined;
|
||||
}
|
||||
|
||||
export function addPkgConfigPathToEnv(path: string): undefined {
|
||||
const pkg_config_path = process.env['PKG_CONFIG_PATH'];
|
||||
|
||||
if (pkg_config_path === undefined) {
|
||||
core.exportVariable('PKG_CONFIG_PATH', path);
|
||||
} else {
|
||||
if (IS_WINDOWS) {
|
||||
core.exportVariable('PKG_CONFIG_PATH', `${path};${pkg_config_path}`);
|
||||
} else {
|
||||
core.exportVariable('PKG_CONFIG_PATH', `${path}:${pkg_config_path}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue