fix: lazy load the external actions

This commit is contained in:
Amin Yahyaabadi 2021-09-17 13:12:48 -05:00
parent d028e18862
commit 3ea0053fe7
3 changed files with 6 additions and 3 deletions

2
dist/main.js vendored

File diff suppressed because one or more lines are too long

2
dist/main.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,3 @@
import { setupMSVCDevCmd } from "./msvc-dev-cmd/index"
import { setupChocoPack } from "../utils/setup/setupChocoPack"
import { error, exportVariable } from "@actions/core"
import { existsSync } from "fs"
@ -68,5 +67,9 @@ export async function setupMSVC(
if (VCTargetsPath !== undefined && existsSync(VCTargetsPath)) {
exportVariable("VCTargetsPath", VCTargetsPath)
}
// lazy load the action so it is not executed
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { setupMSVCDevCmd } = require("./msvc-dev-cmd/index")
setupMSVCDevCmd(getArch(arch), sdk, toolset, uwp, spectre)
}