Skip to content

Commit

Permalink
Merge pull request #99 from daniele-pini/fail_on_error_false_level_fix
Browse files Browse the repository at this point in the history
Fix --level reviewdog option when fail_on_error is false
  • Loading branch information
jdkato authored Sep 25, 2023
2 parents 13d7966 + 79437a5 commit 7542b61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function run(actionInput) {
`-reporter=${core.getInput('reporter')}`,
`-fail-on-error=${should_fail}`,
`-filter-mode=${core.getInput('filter_mode')}`,
`-level=${vale_code == 1 && should_fail ? 'error' : 'info'}`
`-level=${vale_code == 1 && should_fail === 'true' ? 'error' : 'info'}`
], {
cwd,
input: Buffer.from(output.stdout, 'utf-8'),
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export async function run(actionInput: input.Input): Promise<void> {
`-reporter=${core.getInput('reporter')}`,
`-fail-on-error=${should_fail}`,
`-filter-mode=${core.getInput('filter_mode')}`,
`-level=${vale_code == 1 && should_fail ? 'error' : 'info'}`
`-level=${
vale_code == 1 && should_fail === 'true' ? 'error' : 'info'
}`
],
{
cwd,
Expand Down

0 comments on commit 7542b61

Please sign in to comment.