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

Cspell does not find any files #2350

Closed
14 tasks
tomaszs opened this issue Jan 27, 2022 · 7 comments
Closed
14 tasks

Cspell does not find any files #2350

tomaszs opened this issue Jan 27, 2022 · 7 comments
Labels

Comments

@tomaszs
Copy link

tomaszs commented Jan 27, 2022

Info

Kind of Issue

  • [ X] runtime - command-line tools
  • building / compiling
  • security
  • change in behavior
  • crash / error

Which Tool or library

  • [ X] cspell -- the command-line spelling tool
  • cspell-tools -- used for building dictionary files
  • cspell-lib -- library that does the actual spell checking.
  • cspell-trie -- tool for working with trie files.

Which Version

Version: 5.13.4

Issue with supporting library?

  • [X ] No
  • cspell-glob -- library for matching glob patterns
  • cspell-io -- thin file i/o library
  • cspell-trie-lib - trie lib
  • cspell-trie2-lib - trie lib alternate format

OS:

  • Macos
  • Linux
  • [ X] Windows
  • Other

version:

OS version if applicable. 7

Bug Description

Cspell does not find any files

To Reproduce

Steps to reproduce the behavior:

  1. Define package.json script: "cspell": "cspell lint --no-progress --show-suggestions '**'",
  2. Install cspell globally
  3. Add cspell location to PATH
  4. Execute npm run cspell

Result:

CSpell: Files checked: 0, Issues found: 0 in 0 files
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ....: cspell lint --show-suggestions -v '**' --config cspell.json
npm ERR! Exit status 1

Expected behavior

Cspell finds projects files and processes them.

@nschonni
Copy link
Collaborator

nschonni commented Jan 27, 2022

Single quotes don't expand globs. "cspell": "cspell lint --no-progress --show-suggestions \"**\""

@Jason3S
Copy link
Collaborator

Jason3S commented Jan 27, 2022

@tomaszs,

As @nschonni said, single quotes ' do not work on windows. You must use ". Did you copy example code?

@tomaszs
Copy link
Author

tomaszs commented Jan 27, 2022

Thanks for answers. I don't know from where the code was used unfortunately.
One quick question: if I use double quotes, will it work on MacOS and Linux as well?

@Jason3S
Copy link
Collaborator

Jason3S commented Jan 27, 2022

Thanks for answers. I don't know from where the code was used unfortunately. One quick question: if I use double quotes, will it work on MacOS and Linux as well?

Yes, double quotes works just fine on the MacOS and Linux. So do the single quotes, which is why I asked about the original example.

  • cspell '**' will work just fine on the Mac and in Linux, it just fails on Windows.
  • cspell "**" will work on all of them.

@tomaszs
Copy link
Author

tomaszs commented Jan 27, 2022

Thanks!

@Jason3S Jason3S closed this as completed Jan 28, 2022
@tomaszs
Copy link
Author

tomaszs commented Jan 28, 2022

It would be helpful to add a note about it to Readme. I remember I was looking for any phrase related to cspell and Windows, since it was quite easy to narrow it down to Windows.

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants