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

fix: make globs work on Windows #1374

Merged
merged 1 commit into from
Feb 14, 2020
Merged

fix: make globs work on Windows #1374

merged 1 commit into from
Feb 14, 2020

Conversation

wincent
Copy link
Contributor

@wincent wincent commented Feb 14, 2020

Avoids this spurious error on Windows:

$ prettier --write -- '*.{js,json,md}' '{.github,scripts,src,test}/**/*.{js,jsx,md}'
[error] No matching files. Patterns tried: '*.{js,json,md}' '{.github,scripts,src,test}/**/*.{js,jsx,md}' !**/node_modules/** !./node_modules/** !**/.{git,svn,hg}/** !./.{git,svn,hg}/**

Seems that single quotes get treated literally by the shell, so you have to use double quotes instead:

https://stackoverflow.com/a/48104731/2103996

Avoids this spurious error on Windows:

    $ prettier --write -- '*.{js,json,md}' '{.github,scripts,src,test}/**/*.{js,jsx,md}'
    [error] No matching files. Patterns tried: '*.{js,json,md}' '{.github,scripts,src,test}/**/*.{js,jsx,md}' !**/node_modules/** !./node_modules/** !**/.{git,svn,hg}/** !./.{git,svn,hg}/**

Seems that single quotes get treated literally by the shell, so you have
to use double quotes instead:

https://stackoverflow.com/a/48104731/2103996
@wincent
Copy link
Contributor Author

wincent commented Feb 14, 2020

Got @georgel-pop-lr to confirm that this works on Windows, and apparently, it does. 🎉

@wincent
Copy link
Contributor Author

wincent commented Feb 14, 2020

CI is green (https://travis-ci.org/liferay/alloy-editor/builds/650411315), so going to merge this.

@wincent wincent merged commit fa29bb0 into master Feb 14, 2020
@wincent wincent deleted the wincent/windows branch February 14, 2020 12:19
wincent added a commit to liferay/liferay-npm-tools that referenced this pull request Feb 14, 2020
Analogous change to this one on the alloy-editor repo:

liferay/alloy-editor#1374

Just in case anybody is ever foolhardy enough to try doing development
on this repo on Windows.
wincent added a commit to liferay/liferay-js-themes-toolkit that referenced this pull request Feb 14, 2020
Analogous change to this one on the alloy-editor repo:

liferay/alloy-editor#1374

Just in case anybody is ever foolhardy enough to try doing development
on this repo on Windows.
wincent added a commit to liferay/eslint-config-liferay that referenced this pull request Feb 14, 2020
Analogous change to this one on the alloy-editor repo:

liferay/alloy-editor#1374

Just in case anybody is ever foolhardy enough to try doing development
on this repo on Windows.
wincent added a commit to liferay/liferay-ckeditor that referenced this pull request Feb 14, 2020
Analogous change to this one on the alloy-editor repo:

liferay/alloy-editor#1374

Just in case anybody is ever foolhardy enough to try doing development
on this repo on Windows.
wincent added a commit to liferay/liferay-frontend-guidelines that referenced this pull request Feb 14, 2020
Analogous change to this one on the alloy-editor repo:

liferay/alloy-editor#1374

Just in case anybody is ever foolhardy enough to try doing development
on this repo on Windows.
bryceosterhaus pushed a commit to bryceosterhaus/clay that referenced this pull request May 19, 2020
Analogous change to this one on the alloy-editor repo:

liferay/alloy-editor#1374

Just in case anybody is ever foolhardy enough to try doing development
on this repo on Windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant