Skip to content
Permalink
Browse files

Check for invalid retention-days input

  • Loading branch information
Yang Cao
Yang Cao committed Sep 18, 2020
1 parent 59018c2 commit 4560c23b396d494f0cb7066e1d6e258e8feb8051
Showing with 6 additions and 0 deletions.
  1. +3 −0 dist/index.js
  2. +3 −0 src/input-helper.ts
@@ -6405,6 +6405,9 @@ function getInputs() {
const retentionDaysStr = core.getInput(constants_1.Inputs.RetentionDays);
if (retentionDaysStr) {
inputs.retentionDays = parseInt(retentionDaysStr);
if (isNaN(inputs.retentionDays)) {
core.setFailed('Invalid retention-days');
}
}
return inputs;
}
@@ -31,6 +31,9 @@ export function getInputs(): UploadInputs {
const retentionDaysStr = core.getInput(Inputs.RetentionDays)
if (retentionDaysStr) {
inputs.retentionDays = parseInt(retentionDaysStr)
if (isNaN(inputs.retentionDays)) {
core.setFailed('Invalid retention-days')
}
}

return inputs

0 comments on commit 4560c23

Please sign in to comment.
You can’t perform that action at this time.