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]: stdin for path not working on windows anymore #6306

Closed
1 task done
dekaravanhoc opened this issue Oct 4, 2024 · 4 comments · Fixed by #6345
Closed
1 task done

[Bug]: stdin for path not working on windows anymore #6306

dekaravanhoc opened this issue Oct 4, 2024 · 4 comments · Fixed by #6345
Labels

Comments

@dekaravanhoc
Copy link

Kind of Issue

Change in behavior / Regression

Tool or Library

cspell

Version

8.14.4

Supporting Library

No response

OS

Windows

OS Version

Windows 11

Description

Hi,

https://github.com/davidmh/cspell.nvim uses the stdin feature to get spellchecking on the current opened file.
But on Windows using stdin with a path returns Linter Error: Invalid URL.
That worked on older versions up to 8.11.0

Steps to Reproduce

  1. cspell stdin://C:\Users\XXX\AppData\Local\nvim\lua\package_manager\init.lua (or any other file)
  2. Error pops up.

(Tried different formating for the Slashes all the same. The above did still work up till version 8.11.0.

Expected Behavior

Correct output for spellcheck.

Additional Information

No response

cspell.json

No response

cspell.config.yaml

No response

Example Repository

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Jason3S
Copy link
Collaborator

Jason3S commented Oct 5, 2024

@dekaravanhoc,

Thank you. I had not realized that had broken on Windows.

@Jason3S
Copy link
Collaborator

Jason3S commented Oct 9, 2024

Sorry for taking so long, I had to get access to a Windows machine to see what is going on.

The workaround is to use three slashes: stdin:///C:/Users/XXX/AppData/Local/nvim/lua/package_manager/init.lua.

I'll see if I can adjust the parser to have the old behavior work.

From 8.11 the spell checker started using URLs internally. The NodeJS URL parser does something weird with just 2 slashes.

@Jason3S
Copy link
Collaborator

Jason3S commented Oct 9, 2024

The workaround is to use three slashes: stdin:///C:/Users/XXX/AppData/Local/nvim/lua/package_manager/init.lua.

I should have tested it before I wrote it. This doesn't work. I'll look for a fix in the code.

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 Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants