Skip to content

Commit

Permalink
Merge branch 'master' into not-ready-v4-not-ready
Browse files Browse the repository at this point in the history
  • Loading branch information
jurplel committed Feb 6, 2024
2 parents e22b1e0 + f3da5f1 commit deb4b25
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,18 @@ const run = async (): Promise<void> => {
toolsPaths(inputs.dir).map(nativePath).forEach(core.addPath);
}

// Set environment variables
if (inputs.setEnv) {
if (inputs.tools.length) {
core.exportVariable("IQTA_TOOLS", nativePath(`${inputs.dir}/Tools`));
}
if (inputs.isInstallQtBinaries) {
const qtPath = nativePath(locateQtArchDir(inputs.dir));
// Set environment variables/outputs for tools
if (inputs.tools.length && inputs.setEnv) {
core.exportVariable("IQTA_TOOLS", nativePath(`${inputs.dir}/Tools`));
}
// Set environment variables/outputs for binaries
if (inputs.isInstallQtBinaries) {
const qtPath = nativePath(locateQtArchDir(inputs.dir));
// Set outputs
core.setOutput("qtPath", qtPath);

// Set env variables
if (inputs.setEnv) {
if (process.platform === "linux") {
setOrAppendEnvVar("LD_LIBRARY_PATH", nativePath(`${qtPath}/lib`));
}
Expand All @@ -445,8 +450,6 @@ const run = async (): Promise<void> => {
core.addPath(nativePath(`${qtPath}/bin`));
}
}
// Expose outputs
core.setOutput("qtPath", qtPath);
} catch (error) {
if (error instanceof Error) {
core.setFailed(error);
Expand Down

0 comments on commit deb4b25

Please sign in to comment.