Globber exception when using a path with an exclamation
See original GitHub issueWhat You Are Seeing?
Running a cake script in a folder containing an ! (exclamation) e.g. “C:\Some ! Directory” build.cake throws an exception, “Unknown token”
What is Expected?
Glober should allow to use exclamations in a path.
What version of Cake are you using?
v0.16.2
Are you running on a 32 or 64 bit system?
x64
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
TC, but also reproducable locally.
How Did You Get This To Happen? (Steps to Reproduce)
Running the following cake script in a folder with an exclamation, e.g. “C:\Some ! Directory”
Task("Test")
.Does(() =>
{
var SourceFolder = GetFiles(MakeAbsolute(Directory("./")).FullPath);
});
RunTarget("Test");
Output Log
Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Compiling build script...
========================================
Test
========================================
Executing task: Test
An error occured when executing task 'Test'.
Error: Unknown token
Press any key to continue . . .
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Issue with special characters in path (exclamation point ! ...
Exclamation marks get clobbered when delayed expansion is enabled while you set a variable. You can avoid this by waiting to delay expansion ......
Read more >Repairing MXD Broken Paths in ArcMap (red exclamation ...
Short video covering broken MXD path in Arcmap. Utilizes Repair Data Sources tool and setting of relative paths option for future use.
Read more >Unclear error message in case of Exclamation mark ...
Webpack should at least provide a proper error message saying that user cannot have Exclamation marks in the path.
Read more >What does it mean if a Ruby method ends in an ...
It means an exception will be raised if the method would otherwise return false. ... Learning programming: Why are exclamation marks used in...
Read more >Is it possible to index an exclamation point?
I'm typesetting a manual on using the R programming language. As in a few other languages, ! is used as the logical operator...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As the globber is one of those pieces you can replace with a module, an alternative breaking way doesn’t need to break the default for every Cake user out there, but could rather be an opt-in experience. Going the contrib module path would also make it easier to do an PoC and compare default to new globber in a safe way out of band with Cake releases.
I would hope that in the long term future, extglob would be supported OOB since C# developers (especially web developers) will be used to them from tooling across the board. AFAIK everything npm-based is extglob: grunt, gulp, etc. I’m not sure of the demand for non-ext globs. To be fair though, I think
.gitignore
and.tfignore
are simple globs with the added rule that!
at the first character of the line negates the entire pattern.