mirror of
https://github.com/actions/upload-artifact.git
synced 2025-06-24 00:26:11 +02:00
add defaulting to warn when if-no-files-found parameter is not given
This commit is contained in:
parent
3cea537223
commit
32f2b1ee45
3 changed files with 12 additions and 7070 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -7177,7 +7177,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)}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue