Merge 5c459179e7745e2c730c50b10a6459da0b6f25db into 83fd05a356d7e2593de66fc9913b3002723633cb
This commit is contained in:
commit
df38ce7333
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -7827,7 +7827,9 @@ function getInputs() {
|
||||
const name = core.getInput(constants_1.Inputs.Name);
|
||||
const path = core.getInput(constants_1.Inputs.Path, { required: true });
|
||||
const ifNoFilesFound = core.getInput(constants_1.Inputs.IfNoFilesFound);
|
||||
const noFileBehavior = constants_1.NoFileOptions[ifNoFilesFound];
|
||||
const noFileBehavior = !ifNoFilesFound || ifNoFilesFound === ''
|
||||
? constants_1.NoFileOptions.warn
|
||||
: constants_1.NoFileOptions[ifNoFilesFound];
|
||||
if (!noFileBehavior) {
|
||||
core.setFailed(`Unrecognized ${constants_1.Inputs.IfNoFilesFound} input. Provided: ${ifNoFilesFound}. Available options: ${Object.keys(constants_1.NoFileOptions)}`);
|
||||
}
|
||||
|
@ -10,7 +10,10 @@ export function getInputs(): UploadInputs {
|
||||
const path = core.getInput(Inputs.Path, {required: true})
|
||||
|
||||
const ifNoFilesFound = core.getInput(Inputs.IfNoFilesFound)
|
||||
const noFileBehavior: NoFileOptions = NoFileOptions[ifNoFilesFound]
|
||||
const noFileBehavior: NoFileOptions =
|
||||
!ifNoFilesFound || ifNoFilesFound === ''
|
||||
? NoFileOptions.warn
|
||||
: NoFileOptions[ifNoFilesFound]
|
||||
|
||||
if (!noFileBehavior) {
|
||||
core.setFailed(
|
||||
|
Loading…
x
Reference in New Issue
Block a user