-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml/v2: Detect file patterns automatically (#2873)
<!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md) for Pulumi's contribution guidelines. Help us merge your changes more quickly by adding more details such as labels, milestones, and reviewers.--> ### Proposed changes <!--Give us a brief description of what you've done and what it solves. --> This PR teaches `ConfigGroup` to detect whether a given file path is a glob pattern, to make the handling of non-existent files be consistent w.r.t `ConfigFile`. In other words, `*.yaml` MAY match a file whereas `manifest.yaml` MUST match a file. The detection code looks for special characters '*', '?', and '[' and respects the escape syntax. Intended to be consistent with: [https://pkg.go.dev/path/filepath#Match](https://pkg.go.dev/path/filepath#Match) An alternative to doing pattern detection would be: 1. to expose a `glob` property to toggle globbing, or 2. a `patterns` property alongside the `files` property for patterns and non-patterns respectively ### Related issues (optional) <!--Refer to related PRs or issues: #1234, or 'Fixes #1234' or 'Closes #1234'. Or link to full URLs to issues or pull requests in other GitHub repositories. --> Closes #2871
- Loading branch information
1 parent
101fcfb
commit 9595b1a
Showing
2 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters