mirror of https://github.com/aminya/setup-cpp
fix: lazy-load setupActionsPython
This commit is contained in:
parent
664c165fd7
commit
2d4c04a0f7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,7 +6,6 @@ import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||||
import hasha from "hasha"
|
import hasha from "hasha"
|
||||||
import { join } from "path"
|
import { join } from "path"
|
||||||
import { isCI } from "../utils/env/isci"
|
import { isCI } from "../utils/env/isci"
|
||||||
import { setupActionsPython } from "./actions_python"
|
|
||||||
|
|
||||||
export function setupPython(version: string, setupDir: string, arch: string) {
|
export function setupPython(version: string, setupDir: string, arch: string) {
|
||||||
if (!isCI()) {
|
if (!isCI()) {
|
||||||
|
@ -14,6 +13,8 @@ export function setupPython(version: string, setupDir: string, arch: string) {
|
||||||
return setupPythonViaSystem("", setupDir, arch)
|
return setupPythonViaSystem("", setupDir, arch)
|
||||||
}
|
}
|
||||||
try {
|
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)
|
return setupActionsPython(version, setupDir, arch)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return setupPythonViaSystem(version, setupDir, arch)
|
return setupPythonViaSystem(version, setupDir, arch)
|
||||||
|
|
Loading…
Reference in New Issue