mirror of
https://gitea.com/actions/upload-artifact.git
synced 2025-09-16 00:28:47 +08:00
Fail if unrecognized input
This commit is contained in:
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -6374,6 +6374,9 @@ function getInputs() {
|
||||
const path = core.getInput(constants_1.Inputs.Path, { required: true });
|
||||
const ifNoFilesFound = core.getInput(constants_1.Inputs.IfNoFilesFound);
|
||||
const noFileBehavior = constants_1.NoFileOptions[ifNoFilesFound];
|
||||
if (!noFileBehavior) {
|
||||
core.setFailed(`Unrecognized if-no-files-found input. Provided ${ifNoFilesFound}. Available options include ${Object.keys(constants_1.NoFileOptions).map(k => constants_1.NoFileOptions[k])}`);
|
||||
}
|
||||
return {
|
||||
artifactName: name,
|
||||
searchPath: path,
|
||||
|
Reference in New Issue
Block a user