fix: lazy-load setupActionsPython

This commit is contained in:
Amin Yahyaabadi 2021-11-21 16:22:27 -06:00
parent 664c165fd7
commit 2d4c04a0f7
3 changed files with 4 additions and 3 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,6 @@ import { setupChocoPack } from "../utils/setup/setupChocoPack"
import hasha from "hasha"
import { join } from "path"
import { isCI } from "../utils/env/isci"
import { setupActionsPython } from "./actions_python"
export function setupPython(version: string, setupDir: string, arch: string) {
if (!isCI()) {
@ -14,6 +13,8 @@ export function setupPython(version: string, setupDir: string, arch: string) {
return setupPythonViaSystem("", setupDir, arch)
}
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { setupActionsPython } = require("./actions_python") as typeof import("./actions_python")
return setupActionsPython(version, setupDir, arch)
} catch (err) {
return setupPythonViaSystem(version, setupDir, arch)