fix: ensure max artifact count variable is treated as a string
This commit is contained in:
@@ -101,7 +101,7 @@ export function getUploadChunkTimeout(): number {
|
||||
// This value can be changed with ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT variable.
|
||||
// Defaults to 1000 as a safeguard for rate limiting.
|
||||
export function getMaxArtifactListCount(): number {
|
||||
const maxCountVar = process.env['ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT'] || 1000
|
||||
const maxCountVar = process.env['ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT'] || '1000'
|
||||
|
||||
const maxCount = parseInt(maxCountVar)
|
||||
if (isNaN(maxCount) || maxCount < 1) {
|
||||
@@ -112,4 +112,3 @@ export function getMaxArtifactListCount(): number {
|
||||
|
||||
return maxCount
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user