Concurrency has a min of 1

This commit is contained in:
Yang Cao
2025-01-08 18:14:04 +00:00
parent ede05b95d7
commit d4385a64a7
2 changed files with 9 additions and 1 deletions

View File

@@ -61,7 +61,7 @@ export function getConcurrency(): number {
const concurrencyOverride = process.env['ACTIONS_UPLOAD_CONCURRENCY']
if (concurrencyOverride) {
const concurrency = parseInt(concurrencyOverride)
if (isNaN(concurrency)) {
if (isNaN(concurrency) || concurrency < 1) {
throw new Error(
'Invalid value set for ACTIONS_UPLOAD_CONCURRENCY env variable'
)