Skip to content

Commit

Permalink
fix: fix a bug that action succeeds even if trivy fails (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Oct 22, 2023
1 parent 18c05d0 commit 53935fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11095,6 +11095,9 @@ ${table}`;
cwd: inputs.workingDirectory,
env: Object.assign(Object.assign({}, process.env), { REVIEWDOG_GITHUB_API_TOKEN: inputs.githubToken }),
});
if (out.exitCode != 0) {
throw "trivy failed";
}
});
exports.run = run;

Expand Down
3 changes: 3 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ ${table}`;
REVIEWDOG_GITHUB_API_TOKEN: inputs.githubToken,
},
});
if (out.exitCode != 0) {
throw "trivy failed";
}
}

0 comments on commit 53935fc

Please sign in to comment.