Skip to content

Commit

Permalink
Fix error TS2322
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidev committed Feb 13, 2025
1 parent 70d5292 commit 84814b0
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const locateQtWasmHostArchDir = (
hostType: "windows" | "mac" | "linux" | "all_os",
target: "desktop" | "android" | "ios" | "wasm",
version: string
): string => {
): [string, boolean] => {
// For WASM in all_os mode, use the host builder directory
if (hostType === "all_os" && target === "wasm") {
const versionDir = path.join(installDir, version);
Expand Down Expand Up @@ -134,15 +134,18 @@ const locateQtWasmHostArchDir = (
if (!mingwArches.length) {
throw Error(`Failed to locate a MinGW directory for WASM host in ${versionDir}`);
}
return path.join(versionDir, mingwArches[0]);
return [path.join(versionDir, mingwArches[0]), false];
}
case "darwin":
return path.join(versionDir, "clang_64");
return [path.join(versionDir, "clang_64"), false];
default:
return path.join(
versionDir,
compareVersions(version, ">=", "6.7.0") ? "linux_gcc_64" : "gcc_64"
);
return [
path.join(
versionDir,
compareVersions(version, ">=", "6.7.0") ? "linux_gcc_64" : "gcc_64"
),
false,
];
}
}

Expand Down Expand Up @@ -531,7 +534,12 @@ const run = async (): Promise<void> => {
}
// Set environment variables/outputs for binaries
if (inputs.isInstallQtBinaries) {
const [qtPath, requiresParallelDesktop] = locateQtWasmHostArchDir(inputs.dir, inputs.host, inputs.target, inputs.version);
const [qtPath, requiresParallelDesktop] = locateQtWasmHostArchDir(
inputs.dir,
inputs.host,
inputs.target,
inputs.version
);
// Set outputs
core.setOutput("qtPath", qtPath);

Expand Down

0 comments on commit 84814b0

Please sign in to comment.