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

nonull not working? #43

Closed
cowboy opened this Issue May 6, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@cowboy

cowboy commented May 6, 2012

If nonull was set, shouldn't the returned array always contain at least something? I'm using glob@3.1.9.

var glob = require('glob');

glob.sync('xyz', {nonull: true}); // []

glob('xyz', {nonull: true}, function(err, files) {
  console.log(err, files); // logs: null []
});
@cowboy

This comment has been minimized.

Show comment
Hide comment
@cowboy

cowboy Jun 4, 2012

Any thoughts on this issue?

cowboy commented Jun 4, 2012

Any thoughts on this issue?

@cowboy

This comment has been minimized.

Show comment
Hide comment
@cowboy

cowboy Jul 31, 2012

I'm still seeing this behavior in v3.1.11. What's the point of the nonull setting if it doesn't return the originally-specified pattern in the array when files aren't matched?

Per the readme:

nonull Set to never return an empty set, instead returning a set containing the pattern itself. This is the default in glob(3).

cowboy commented Jul 31, 2012

I'm still seeing this behavior in v3.1.11. What's the point of the nonull setting if it doesn't return the originally-specified pattern in the array when files aren't matched?

Per the readme:

nonull Set to never return an empty set, instead returning a set containing the pattern itself. This is the default in glob(3).

@benatkin

This comment has been minimized.

Show comment
Hide comment
@benatkin

benatkin Aug 6, 2012

On this line: https://github.com/isaacs/node-glob/blob/master/glob.js#L181

s/nou/all/

If that's the only bug causing this behavior it ought to fix it.

benatkin commented Aug 6, 2012

On this line: https://github.com/isaacs/node-glob/blob/master/glob.js#L181

s/nou/all/

If that's the only bug causing this behavior it ought to fix it.

@isaacs isaacs closed this in 1be0c30 Aug 6, 2012

@isaacs

This comment has been minimized.

Show comment
Hide comment
@isaacs

isaacs Aug 6, 2012

Owner

Yep. That's the bug, alright. Thanks.

Owner

isaacs commented Aug 6, 2012

Yep. That's the bug, alright. Thanks.

@cowboy

This comment has been minimized.

Show comment
Hide comment
@cowboy

cowboy Aug 6, 2012

Awesome.

cowboy commented Aug 6, 2012

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment