mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-13 06:21:15 +00:00
fix: use working directory
This commit is contained in:
parent
320de79845
commit
3b8d935c85
1 changed files with 5 additions and 5 deletions
10
src/run.ts
10
src/run.ts
|
|
@ -51,11 +51,6 @@ async function runLint(binPath: string, patchPath: string): Promise<void> {
|
|||
printOutput(res)
|
||||
}
|
||||
|
||||
if (core.getBooleanInput(`verify`, { required: true })) {
|
||||
const res = await execShellCommand(`${binPath} config verify`)
|
||||
printOutput(res)
|
||||
}
|
||||
|
||||
let userArgs = core.getInput(`args`)
|
||||
const addedArgs: string[] = []
|
||||
|
||||
|
|
@ -142,6 +137,11 @@ async function runLint(binPath: string, patchPath: string): Promise<void> {
|
|||
cmdArgs.cwd = path.resolve(workingDirectory)
|
||||
}
|
||||
|
||||
if (core.getBooleanInput(`verify`, { required: true })) {
|
||||
const res = await execShellCommand(`${binPath} config verify`, cmdArgs)
|
||||
printOutput(res)
|
||||
}
|
||||
|
||||
const cmd = `${binPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd()
|
||||
|
||||
core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue