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

Windows Compatibility issue #16

Open
RITIKHARIANI opened this issue Jul 22, 2020 · 9 comments · May be fixed by #21
Open

Windows Compatibility issue #16

RITIKHARIANI opened this issue Jul 22, 2020 · 9 comments · May be fixed by #21
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@RITIKHARIANI
Copy link
Member

RITIKHARIANI commented Jul 22, 2020

Describe the bug
The prettier-format script doesn't work on windows. It works only on Linux. Due to this, the Windows User wont be able to make a commit.
This is because in Windows the path is described with '\' backslashes and in Linux it uses forward slashes '/'

"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write",

To Reproduce
Steps to reproduce the behavior:
Try making a commit on Windows. The husky script will throw an error.

Expected behavior
A clear and concise description of what you expected to happen.
Bug

Screenshots
Fix for Windows OS is as follows:

Fix

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@parthvshah
Copy link
Member

Please add screenshots instead of pictures. Just makes it look cleaner. On windows you can use shift+windows key+S to take a snip.

@RITIKHARIANI
Copy link
Member Author

Please add screenshots instead of pictures. Just makes it look cleaner. On windows you can use shift+windows key+S to take a snip.

Added Screenshots now

@aniketnk
Copy link
Collaborator

aniketnk commented Jul 22, 2020

Will look into this!
If you find any fixes, post the solution here, and claim that you're working on it.

Edit: Should work on both Windows and *nix

@aniketnk aniketnk added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jul 22, 2020
@aniketnk
Copy link
Collaborator

@RITIKHARIANI
Copy link
Member Author

@RITIKHARIANI
StackOverflow: Run prettier on windows
Does this work?

Without the quotes?

@RITIKHARIANI
Copy link
Member Author

RITIKHARIANI commented Jul 22, 2020

Okay Nice
It worked on Windows without the quotes
Does it work on Linux/Ubuntu?
Check that?
I will add this fix to the PR or you could directly change it in master

@RITIKHARIANI RITIKHARIANI linked a pull request Jul 22, 2020 that will close this issue
2 tasks
@aniketnk
Copy link
Collaborator

Great @RITIKHARIANI !
@temanisparsh Please confirm it works on *nix, and let's get #21 merged!

@temanisparsh
Copy link
Contributor

Works fine

@RITIKHARIANI
Copy link
Member Author

Let's merge? If everything is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants