Skip to content
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

Bug: "No files matching ''**/*.mjs'' were found" on Windows #37

Open
bcoe opened this issue Nov 15, 2020 · 3 comments
Open

Bug: "No files matching ''**/*.mjs'' were found" on Windows #37

bcoe opened this issue Nov 15, 2020 · 3 comments

Comments

@bcoe
Copy link

bcoe commented Nov 15, 2020

What version of this package are you using?

7.0.0

What operating system, Node.js, and npm version?

Windows (works fine on OSX/Linux).

What happened?

I receive an exception that the following matching rules does not work on Windows:

standardx --fix '**/*.mjs' && standardx --fix '**/*.cjs' && standardx --fix './*.mjs' && standardx --fix './*.cjs'

see: yargs/yargs#1804

If I drop the quotes around the --fix statements, I begin receiving the following errors:

  /Users/bencoe/oss/yargs/test/parser.cjs:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override.
  /Users/bencoe/oss/yargs/test/usage.cjs:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override.
  /Users/bencoe/oss/yargs/test/validation.cjs:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override.
  /Users/bencoe/oss/yargs/test/yargs.cjs:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override.

What did you expect to happen?

I would like to figure out a glob pattern that works for .cjs, .mjs, in top level and nested folder, both on Windows and Linux.

Are you willing to submit a pull request to fix this bug?

If I was pointed in the right direction. Seem like potentially the tokenizer should drop quotes around glob patterns.

@feross
Copy link
Member

feross commented Nov 26, 2020

This sounds like a bug. Does it occur with standard as well, or just standardx?

@bcoe
Copy link
Author

bcoe commented Nov 30, 2020

@feross I haven't tested with standard, it didn't happen 6.x.x of standardx.

I can kick off tests with standard at some point this week, if that would help debug.

@brandhaug
Copy link

brandhaug commented Jun 22, 2022

Had the same problem, but was able to fix it by using \" instead of ' around the paths in the scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants