Skip to content

Globstar pattern returns an empty string as an element of the results array #519

@mrmlnc

Description

@mrmlnc

What the problem?

The ** pattern returns an empty string as an element of the results array.

Steps to reproduce

const ng = require('glob');

// MaxDepth option only for shortening the list of results
const entries = ng.globSync('**', { maxDepth: 1 });

console.dir(entries, { colors: true });

Actual behaviour

[
  '',
  'tsconfig.json',
  'src',
  'package.json',
  'out',
  'node_modules',
  'index.js',
  'herebyfile.mjs',
  'fixtures',
  'README.md',
  'LICENSE'
]

Expected behavioud

[
- '',
  'tsconfig.json',
  'src',
  'package.json',
  'out',
  'node_modules',
  'index.js',
  'herebyfile.mjs',
  'fixtures',
  'README.md',
  'LICENSE'
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions