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

Change exclude to use ** to skip levels #834

Merged
merged 2 commits into from
Aug 15, 2019

Conversation

richardc
Copy link
Contributor

Description

As raised in #833 I find the current behaviour of exclude to be a little alarming, I expect the exclude 'start/*/end' to match 'start/middle/end' but not 'start/on/the/way/to/the/end'

Here we specify File::FNM_PATHNAME to the fnmatch call, so 'start/*/end' still matches 'start/middle/end', but you need 'start/**/end' if you want to match 'start/on/the/way/to/the/end'

Closes #833


Maintainers

Please ensure that you check for:

  • [] If this change impacts git cache validity, it bumps the git cache
    serial number
  • [] If this change impacts compatibility with omnibus-software, the
    corresponding change is reviewed and there is a release plan
  • [] If this change impacts compatibility with the omnibus cookbook, the
    corresponding change is reviewed and there is a release plan

excludes I think overmatches due to a lack of FNM_PATHNAME.

This is surprising to me, but may not be a bug depending on your
expectations.

Signed-off-by: Richard Clamp <[email protected]>
Here we adjust the tests and code to match what I expected should
happen, that you want a '**' to skip levels when excluding, and for '*'
to not match '/'

Signed-off-by: Richard Clamp <[email protected]>
@richardc richardc requested a review from a team as a code owner April 13, 2018 09:06
Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable and looks good to me. 👍

@srenatus
Copy link
Contributor

💭 I do wonder, however, how many users potentially depend on * acting as it did before. @chef/omnibus-maintainers: should this be reflected in some variant of a version bump, maybe?

@richardc
Copy link
Contributor Author

Cucumber failures are the same as on master. 😭

@twk3
Copy link
Contributor

twk3 commented Aug 2, 2019

This is still an issue that is biting us. What further needs to be done for this PR?

@dustinmm80
Copy link

Looks like CI may have stalled out.

@tas50 tas50 merged commit 8657d96 into chef:master Aug 15, 2019
@tas50
Copy link
Contributor

tas50 commented Aug 15, 2019

Thanks @richardc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exclude overmatches directory globs
6 participants