Skip to content

Commit 6978621

Browse files
committed
fix: rename exitOnNoFiles input to exit-on-no-files for consistency
1 parent 3a27361 commit 6978621

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ inputs:
145145
description: 'Add a pull request comment only if tests fail.'
146146
required: false
147147
default: false
148-
exitOnNoFiles:
148+
exit-on-no-files:
149149
description:
150150
'Exit the workflow with a failure status if no test files are found.'
151151
required: false

dist/index.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/file-system.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ export function readCtrfReports(
4545
if (reports.length === 0) {
4646
if (exitOnNoFiles) {
4747
core.setFailed(`No CTRF reports found at: ${pattern}. Exiting action.`)
48+
process.exit(core.ExitCode.Failure)
4849
}
4950

5051
core.warning(`CTRF report not found at: ${pattern}. Exiting action.`)
51-
process.exit(0)
52+
process.exit(core.ExitCode.Success)
5253
}
5354

5455
const report: Report =
@@ -59,9 +60,10 @@ export function readCtrfReports(
5960
const errorMessage = error instanceof Error ? error.message : String(error)
6061
if (exitOnNoFiles) {
6162
core.setFailed(`No CTRF reports found at: ${pattern}. Exiting action.`)
63+
process.exit(core.ExitCode.Failure)
6264
}
6365
core.warning(`${errorMessage}. Exiting action.`)
64-
process.exit(0)
66+
process.exit(core.ExitCode.Success)
6567
}
6668
}
6769

0 commit comments

Comments
 (0)