Added a WithNoFollow option for Glob, GlobWalk, and FilepathGlob that will cause doublestar to not follow symlinks. However, note that there is a caveat due to io/fs limitations: if the pattern mentions a symlink before any meta characters, those symlinks will be followed. For example: path/to/symlink/*will follow the symlink, assuming it is valid and links to a directory. path/** and path/*/symlink/* will not follow the symlink.
Added WithFilesOnly
Added a new option for Glob, GlobWalk, and FilepathGlob called WithFilesOnly that will cause these functions to only return files. For example, a pattern such as folder/* will only return the files inside the folder, and not any directories. Note that symlinks to directories are considered directories for this purpose.
Added WithFailOnPatternNotExist
Added the option WithFailOnPatternNotExist to Glob, GlobWalk, and FilepathGlob. This option will cause doublestar to abort if the pattern references a path that does not exist, for example, nonexistent/path/*.
Fixed Glob Bug With Pattern That Has Nonexistent Path And WithFailOnIOErrors
If the WithFailOnIOErrors option was set and the pattern contained a reference to a nonexistent path (such as nonexistent/path/*), Glob would return ErrNotExist. It now returns an empty result with no error as expected.
For anyone that would prefer that doublestar returned an error, I'll be adding that as a feature (and a separate option) later.
Commits
465a339 Merge pull request #82 from bmatcuk/withnofollow
c5b3a48 fixes #72 adds WithNoFollow option with caveat
3c85a19 Merge pull request #81 from bmatcuk/withfilesonly
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/bmatcuk/doublestar/v4 from 4.3.0 to 4.6.0.
Release notes
Sourced from github.com/bmatcuk/doublestar/v4's releases.
Commits
465a339
Merge pull request #82 from bmatcuk/withnofollowc5b3a48
fixes #72 adds WithNoFollow option with caveat3c85a19
Merge pull request #81 from bmatcuk/withfilesonly016ef08
closes #79 added WithFilesOnly65c0f86
update with masterde326ac
added WithFailOnPatternNotExist8991cfe
improve testsaf72981
keep Clean output623b19c
better match FilepathGlob to filepath.Glob in corner casesb636b10
fixes #68 corner cases for FilepathGlobDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)