Skip to content

MacOS ignore "/Contents/" by default #616

Open
@kmturley

Description

@kmturley

On MacOS if I run:

import { globSync } from 'glob';
const files = globSync('./plugins/**/*.*');
console.log(files);

The output is:

[
  'plugins/Surge XT Effects.app',
  'plugins/Surge XT Effects.app/Contents/Info.plist',
  'plugins/Surge XT Effects.app/Contents/Resources/RecentFilesMenuTemplate.nib',
  'plugins/Surge XT Effects.app/Contents/Resources/Icon.icns'
]

If I change to:

import { globSync } from 'glob';
const files = globSync('./plugins/**/*.*', { ignore: ['./plugins/**/Contents/**/*'] });
console.log(files);

The output is:

[
  'plugins/Surge XT Effects.app',
]

My assumption is that most users want want the "file" as shown in the UI, vs the contents of the package.

  1. Should the default functionality be to hide the Contents directory?
  2. Could there be a helper to switch this feature on/off without specifying an ignore negation rule?

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