diff --git a/src/main.ts b/src/main.ts index 83a510fe..84e26788 100644 --- a/src/main.ts +++ b/src/main.ts @@ -121,7 +121,7 @@ export async function main(): Promise { // setup brew const brewVersion = maybeGetInput("brew") if (brewVersion !== undefined) { - await setupBrew() + setupBrew() } // setup ccache diff --git a/src/msvc/msvc.ts b/src/msvc/msvc.ts index 94afdf92..d68c547e 100644 --- a/src/msvc/msvc.ts +++ b/src/msvc/msvc.ts @@ -4,7 +4,7 @@ import { exportVariable } from "@actions/core" import { existsSync } from "fs" import { arch as osArch } from "os" -type MSVCVersion = "2015" | "2017" | "2019" | string +type MSVCVersion = "2015" | "2017" | "2019" | "true" | string function getArch(arch: string): string { switch (arch) { @@ -22,13 +22,16 @@ function getArch(arch: string): string { } } +const default_msvc_version = "2019" + export async function setupMSVC( - version: MSVCVersion, + versionGiven: MSVCVersion, sdk?: string, uwp?: boolean, spectre?: boolean, arch = osArch() ): Promise { + const version = versionGiven === "true" ? default_msvc_version : versionGiven if (process.platform !== "win32") { return }