feat: add default version for msvc

This commit is contained in:
Amin Yahyaabadi 2021-09-16 06:17:38 -05:00
parent 04b70139f6
commit b55bf22468
2 changed files with 6 additions and 3 deletions

View File

@ -121,7 +121,7 @@ export async function main(): Promise<number> {
// setup brew
const brewVersion = maybeGetInput("brew")
if (brewVersion !== undefined) {
await setupBrew()
setupBrew()
}
// setup ccache

View File

@ -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<void> {
const version = versionGiven === "true" ? default_msvc_version : versionGiven
if (process.platform !== "win32") {
return
}