diff --git a/src/install.ts b/src/install.ts index a062143..658fb24 100644 --- a/src/install.ts +++ b/src/install.ts @@ -101,7 +101,12 @@ export async function goInstall(versionConfig: VersionConfig): Promise { printOutput(res) // The output of `go install -n` when the binary is already installed is `touch `. - 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`)