mirror of
https://github.com/actions/upload-artifact.git
synced 2024-11-23 12:39:02 +00:00
Check for invalid retention-days input
This commit is contained in:
parent
59018c2f85
commit
4560c23b39
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -6405,6 +6405,9 @@ function getInputs() {
|
|||||||
const retentionDaysStr = core.getInput(constants_1.Inputs.RetentionDays);
|
const retentionDaysStr = core.getInput(constants_1.Inputs.RetentionDays);
|
||||||
if (retentionDaysStr) {
|
if (retentionDaysStr) {
|
||||||
inputs.retentionDays = parseInt(retentionDaysStr);
|
inputs.retentionDays = parseInt(retentionDaysStr);
|
||||||
|
if (isNaN(inputs.retentionDays)) {
|
||||||
|
core.setFailed('Invalid retention-days');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return inputs;
|
return inputs;
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,9 @@ export function getInputs(): UploadInputs {
|
|||||||
const retentionDaysStr = core.getInput(Inputs.RetentionDays)
|
const retentionDaysStr = core.getInput(Inputs.RetentionDays)
|
||||||
if (retentionDaysStr) {
|
if (retentionDaysStr) {
|
||||||
inputs.retentionDays = parseInt(retentionDaysStr)
|
inputs.retentionDays = parseInt(retentionDaysStr)
|
||||||
|
if (isNaN(inputs.retentionDays)) {
|
||||||
|
core.setFailed('Invalid retention-days')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return inputs
|
return inputs
|
||||||
|
Loading…
Reference in New Issue
Block a user