Extend PKG_CONFIG path rather than overwriting it

This commit is contained in:
Christoph Hansknecht 2025-11-07 15:31:33 +01:00
parent cfd55ca824
commit 87c35f43f0
5 changed files with 51 additions and 5 deletions

View file

@ -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}`);
}
}
}