Skip to content

Commit 0e39c67

Browse files
authored
make pattern error opt in (#417)
* make pattern error opt in * changelog link
1 parent 20e085c commit 0e39c67

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## 2.0.2 (unreleased)
22

3+
- 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)
4+
35
## 2.0.1
46

57
- Add support for make_latest property [#304](https://github.com/softprops/action-gh-release/pull/304) via [@samueljseay](https://github.com/samueljseay)

src/main.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ async function run() {
2525
if (config.input_files) {
2626
const patterns = unmatchedPatterns(config.input_files);
2727
patterns.forEach((pattern) => {
28-
throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`);
28+
if (config.input_fail_on_unmatched_files) {
29+
throw new Error(`⚠️ Pattern '${pattern}' does not match any files.`);
30+
} else {
31+
console.warn(`🤔 Pattern '${pattern}' does not match any files.`);
32+
}
2933
});
3034
if (patterns.length > 0 && config.input_fail_on_unmatched_files) {
3135
throw new Error(`⚠️ There were unmatched files`);

0 commit comments

Comments
 (0)