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

Why it doesn't work in package.json scripts? #119

Closed
theajack opened this issue Aug 13, 2021 · 4 comments
Closed

Why it doesn't work in package.json scripts? #119

theajack opened this issue Aug 13, 2021 · 4 comments

Comments

@theajack
Copy link

Onchange works with this cmd

node .\node_modules\onchange\dist\bin.js -i '**' -- echo '{{event}} to {{file}}''

image

But why it doesn't work in package.json scripts?

image

image

@blakeembrey
Copy link
Collaborator

Do you have a reproduction I can use? I pretty much exclusively use this in package.json scripts so I’m not sure the error is in this module.

@theajack
Copy link
Author

@blakeembrey Thanks for your reply, I found it might be because of the single quotes I used 😂

@blakeembrey
Copy link
Collaborator

Oh interesting, good catch. I don’t use windows often but it’d be because single quotes aren’t a quote character in windows shell. So in Unix the program would be seeing **, but windows was seeing ’**’.

@blakeembrey
Copy link
Collaborator

blakeembrey commented Aug 14, 2021

I’m less familiar with the windows environment you screenshot compared to what environment shell scripts execute in. If you know feel free to comment and I can try adding the description to the README.

Edit: Reference I found online that I could link to.

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

No branches or pull requests

2 participants