Skip to content

Commit c8d99ee

Browse files
committed
Tweak doc and disallow 0 polling timeout
1 parent 2c7349f commit c8d99ee

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ inputs:
6666
required: false
6767
POLLING_TIMEOUT:
6868
description: >
69-
Stop polling the scan result after the specified time in milliseconds, default is 5 minutes.
69+
Stop polling the scan result after the specified time in seconds, default is 5 minutes.
7070
required: false
7171
runs:
7272
using: 'node20'

main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ function run() {
112112
if (isNaN(parsed_polling_timeout)) {
113113
throw new Error("POLLING_TIMEOUT must be a number");
114114
}
115-
if (parsed_polling_timeout < 0) {
116-
throw new Error("POLLING_TIMEOUT must be greater or equal to 0");
115+
if (parsed_polling_timeout <= 0) {
116+
throw new Error("POLLING_TIMEOUT must be greater than 0");
117117
}
118118
}
119119
// Validate severity levels

main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ async function run() {
132132
if (isNaN(parsed_polling_timeout)) {
133133
throw new Error("POLLING_TIMEOUT must be a number");
134134
}
135-
if (parsed_polling_timeout < 0) {
136-
throw new Error("POLLING_TIMEOUT must be greater or equal to 0");
135+
if (parsed_polling_timeout <= 0) {
136+
throw new Error("POLLING_TIMEOUT must be greater than 0");
137137
}
138138
}
139139

0 commit comments

Comments
 (0)