-
-
Notifications
You must be signed in to change notification settings - Fork 33
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] not working in npm script if use ' #30
Comments
@rendomnet You can escape a double quote |
FYI -- Removing the single quotes surrounding the paths resolved the issue for me. Using the example from the OP:
|
I had the same problem. I think this is a documentation thing, as the README e.g. in npmjs says
but as @jhildenbiddle wrote, the single quotes are unnecessary (if the paths don't contain spaces - in that case escaping double quotes around the paths will solve the problem as @whizkidwwe1217 wrote) So: wouldn't it be a good idea to update the README? |
FWIW, I had a process running locally on Windows and on a TeamCity build agent on linux. Removing single quotes made it work OK on Windows but not on linux, Whereas using escaped double quotes as per @whizkidwwe1217's answer worked on both platforms. |
I ran into a similar problem on Mac as well when using |
If I use npm script
"copy": "cpy './package.json' dist"
npm run copy
it will give me error
Cannot copy
'./package.json': the file doesn't exist
But if I remove ' like this
cpy ./package.json dist
it will run correctlyWindows 10
Node 10.24.1
The text was updated successfully, but these errors were encountered: