mirror of https://github.com/aminya/setup-cpp
fix: use core.info instead of startGroup
This commit is contained in:
parent
5e61cbc438
commit
5993d7b019
|
@ -1,5 +1,5 @@
|
|||
import { find, downloadTool, cacheDir } from "@actions/tool-cache"
|
||||
import { addPath, group, startGroup, endGroup, info } from "@actions/core"
|
||||
import { addPath, info } from "@actions/core"
|
||||
import { join } from "path"
|
||||
import { existsSync } from "fs"
|
||||
import * as hasha from "hasha"
|
||||
|
@ -60,23 +60,18 @@ export async function setupBin(
|
|||
|
||||
// download ane extract the package into the installation directory.
|
||||
if (!existsSync(rootDir)) {
|
||||
await group(`Download and extract ${name} ${version}`, async () => {
|
||||
info(`Download and extract ${name} ${version}`)
|
||||
const downloaded = await downloadTool(url)
|
||||
await extractFunction?.(downloaded, rootDir)
|
||||
})
|
||||
}
|
||||
|
||||
const installDir = join(rootDir, extractedFolderName)
|
||||
const binDir = join(installDir, binRelativeDir)
|
||||
|
||||
// Adding the bin dir to the path
|
||||
try {
|
||||
/** The directory which the tool is installed to */
|
||||
startGroup(`Add ${binDir} to PATH`)
|
||||
info(`Add ${binDir} to PATH`)
|
||||
addPath(binDir)
|
||||
} finally {
|
||||
endGroup()
|
||||
}
|
||||
|
||||
// check if inside Github Actions. If so, cache the installation
|
||||
if (typeof process.env.RUNNER_TOOL_CACHE === "string") {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable require-atomic-updates */
|
||||
import { exec, getExecOutput } from "@actions/exec"
|
||||
import which from "which"
|
||||
import { addPath, startGroup, endGroup } from "@actions/core"
|
||||
import { addPath, info } from "@actions/core"
|
||||
import { setupPython } from "../../python/python"
|
||||
import { isBinUptoDate } from "./version"
|
||||
|
||||
|
@ -36,12 +36,8 @@ export async function setupPipPack(name: string, version?: string) {
|
|||
} else {
|
||||
binDir = (await getExecOutput("python -c 'import sys; print(sys.base_exec_prefix)'")).stdout
|
||||
}
|
||||
try {
|
||||
startGroup(`${binDir} to PATH`)
|
||||
info(`${binDir} to PATH`)
|
||||
addPath(binDir)
|
||||
} finally {
|
||||
endGroup()
|
||||
}
|
||||
}
|
||||
|
||||
return { binDir }
|
||||
|
|
Loading…
Reference in New Issue