Compare commits

...

2 Commits

Author SHA1 Message Date
d99959edae prep release 2024-03-10 00:57:11 -05:00
0e39c679e8 make pattern error opt in (#417)
* make pattern error opt in

* changelog link
2024-03-10 00:56:17 -05:00
3 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,8 @@
## 2.0.2 (unreleased)
## 2.0.3 (unreleased)
## 2.0.2
- Revisit approach to [#384](https://github.com/softprops/action-gh-release/pull/384) making unresolved pattern failures opt-in [#417](https://github.com/softprops/action-gh-release/pull/417)
## 2.0.1

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,11 @@ async function run() {
if (config.input_files) {
const patterns = unmatchedPatterns(config.input_files);
patterns.forEach((pattern) => {
if (config.input_fail_on_unmatched_files) {
throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`);
} else {
console.warn(`🤔 Pattern '${pattern}' does not match any files.`);
}
});
if (patterns.length > 0 && config.input_fail_on_unmatched_files) {
throw new Error(`⚠️ There were unmatched files`);