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

CLI on Windows doesn't accept -f - for stdin? #1609

Closed
malcolmr opened this issue Dec 31, 2018 · 6 comments
Closed

CLI on Windows doesn't accept -f - for stdin? #1609

malcolmr opened this issue Dec 31, 2018 · 6 comments
Milestone

Comments

@malcolmr
Copy link

Over at google/vim-codefmt#111, we've had a report that our js-beautify integration doesn't work on Windows.

In this case, we're invoking js-beautify -f - --type js and expecting to be able to use it as a filter from stdin to stdout, but it looks like the user is getting an error message of the form 'Unable to open path "/Users/.../node_modules/npm/-"'.

This sounds like it might be the same problem as #390, but perhaps only for Windows?

@bitwiseman
Copy link
Member

@lsff @malcolmr
What version of js-beautify do you have installed?

@bitwiseman
Copy link
Member

Hm, we have Windows in our CI system and the tests around stdin cover a lot of cases :
https://github.com/beautify-web/js-beautify/blob/master/js/test/shell-test.sh#L120

But that specific one is not in there.

@jvargas
Copy link

jvargas commented Jan 6, 2019

The problem is also present on MacOS 10.14.1 and probably in other operating systems. It is impacting the related emacs package web-beautify, see yasuyk/web-beautify#38

@bitwiseman
Copy link
Member

@jvargas Thanks for that info that will help with testing and fixing.

bitwiseman added a commit that referenced this issue Jan 8, 2019
Fix #1609 stdin marker "-" is ignored error
@bitwiseman
Copy link
Member

@jvargas @malcolmr
Please test this fix by installing 1.8.10-beta2.

@malcolmr
Copy link
Author

malcolmr commented Jan 8, 2019

I don't actually use js-beautify. @lsff may be able to help verify the fix as they were the original reporter of google/vim-codefmt#111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants