-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Globbing Replacement #232
Comments
The maintainer of https://github.com/mattn/go-zglob has just added escaping support and the issue should be fixed if the library is upgraded. However, I'm not a fan of |
hmm, interesting... we can test the other lib too, yes... can you open a PR? |
I just tried to upgrade |
awesome, thanks! |
It's fixed now, at least for my use case. However, I think asterisks still cannot be escaped but I'm not sure. For a long term solution I still think we should switch to https://github.com/gobwas/glob which uses a proper lexer, parser and compiler instead of building a regular expression. The only issue is that it only does matching, so we'll have to implement file walking ourselves. Another thing I would like to add is a an option to disable globbing altogether (we can just use What do you think @caarlos0? |
sounds like a plan @erikgeiser |
This seems to have broken recursive globs like the following: ./release-standalone/**/*: "/usr/lib/code-server/" Only files two levels below the top level are copied now whereas before all files were. Caused a regression in code-server as nfpm wouldn't include the files in |
For now we've rolled back nfpm to v1.9.0 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
As far as I am aware, it is currently impossible to package files or directories that are enclosed in curly braces (such as
{foo}
). An example would be Firefox extensions which use{UUID}
directories. The reason for this is that https://github.com/mattn/go-zglob does not seem to support wildcard escaping and because also because of a bug (mattn/go-zglob#32).A possible alternative to replace https://github.com/mattn/go-zglob with is https://github.com/gobwas/glob which supports the same features, escaping and more extensive tests. However, this library only does string matching and the directory walking will have to be performed in
nfpm
.The text was updated successfully, but these errors were encountered: