mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-16 15:38:28 +00:00
fix: clean go install output
This commit is contained in:
parent
33f56cc1ef
commit
3a8bf72894
1 changed files with 6 additions and 1 deletions
|
|
@ -101,7 +101,12 @@ export async function goInstall(versionConfig: VersionConfig): Promise<string> {
|
||||||
printOutput(res)
|
printOutput(res)
|
||||||
|
|
||||||
// The output of `go install -n` when the binary is already installed is `touch <path_to_the_binary>`.
|
// The output of `go install -n` when the binary is already installed is `touch <path_to_the_binary>`.
|
||||||
const lintPath = res.stderr.trimStart().trimEnd().split(` `, 2)[1]
|
const lintPath = res.stderr
|
||||||
|
.split(/\r?\n/)
|
||||||
|
.map((v) => v.trimStart().trimEnd())
|
||||||
|
.filter((v) => v.startsWith("touch "))
|
||||||
|
.reduce((a, b) => a + b, "")
|
||||||
|
.split(` `, 2)[1]
|
||||||
|
|
||||||
core.info(`Installed golangci-lint into ${lintPath} in ${Date.now() - startedAt}ms`)
|
core.info(`Installed golangci-lint into ${lintPath} in ${Date.now() - startedAt}ms`)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue