question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Globber exception when using a path with an exclamation

See original GitHub issue

What 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:closed
  • Created 7 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
devleadcommented, Nov 12, 2016

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.

0reactions
jnm2commented, Nov 12, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found