From f3da5f138eb67ace9b6a40f9860015c3173baa54 Mon Sep 17 00:00:00 2001 From: Benjamin O Date: Tue, 6 Feb 2024 15:15:36 -0500 Subject: [PATCH] Make it so the code actually compiles --- action/src/main.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/action/src/main.ts b/action/src/main.ts index 1d2bcb9b..8f309c00 100644 --- a/action/src/main.ts +++ b/action/src/main.ts @@ -422,13 +422,18 @@ const run = async (): Promise => { 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`)); } @@ -445,8 +450,6 @@ const run = async (): Promise => { core.addPath(nativePath(`${qtPath}/bin`)); } } - // Expose outputs - core.setOutput("qtPath", qtPath); } catch (error) { if (error instanceof Error) { core.setFailed(error);