Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENT-10250, ENT-10490: Added warning against using glob patterns on Windows #3088

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions reference/functions/findfiles.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,21 @@ match all files in one directory that end in `.cf` but it won't search
across directories. `*/*.cf` on the other hand will look two levels
deep.
* `?` matches a single letter
* `[a-z]` matches any letter from `a` to `z` (not yet supported on Windows)
* `[a-z]` matches any letter from `a` to `z`

This function, used together with the `bundlesmatching` function,
allows you to do dynamic inputs and a dynamic bundle call chain.

**WARNING:**
- The current implementation of glob patterns on Windows contains bugs.
Therefore, we strongly recommend using the `!windows::` class guard
expression to safeguard against any use of the function on Windows platforms.
Rest assured, we are actively working on resolving these issues and improving
its functionality.

**Notes:**

- Brace expansion is not currently supported, `{x,y,anything}` will not match `x` or `y` or `anything`.
- Bracket expressions are currently not supported on Windows. `[a-z]` will be interpreted as its raw string representation on Windows.

**Example:**

Expand Down
10 changes: 8 additions & 2 deletions reference/functions/findfiles_up.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ shells:

* `*` matches any filename or directory
* `?` matches a single letter
* `[a-z]` matches any letter from `a` to `z` (not yet supported on Windows)
* `[a-z]` matches any letter from `a` to `z`

**WARNING:**
- The current implementation of glob patterns on Windows contains bugs.
Therefore, we strongly recommend using the `!windows::` class guard
expression to safeguard against any use of the function on Windows platforms.
Rest assured, we are actively working on resolving these issues and improving
its functionality.

**Notes:**

- Brace expansion is not currently supported, `{x,y,anything}` will not match `x` or `y` or `anything`.
- Bracket expressions are currently not supported on Windows. `[a-z]` will be interpreted as its raw string representation on Windows.

[%CFEngine_function_attributes(path, glob, level)%]

Expand Down
Loading