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] Error with git not finding the dir due to path join slashes #8

Closed
ashmind opened this issue Aug 4, 2017 · 4 comments
Closed

Comments

@ashmind
Copy link
Contributor

ashmind commented Aug 4, 2017

Getting this error:

Error: Command failed: git add -f 'node_modules\codemirror'
fatal: pathspec ''node_modules\codemirror'' did not match any files

    at checkExecSyncError (child_process.js:568:13)
    at Object.execSync (child_process.js:608:13)
    at tmpExec_1 ([REDACTED]\WebApp\node_modules\patch-package\dist\makePatch.js:41:65)
    at stageFiles ([REDACTED]\WebApp\node_modules\patch-package\dist\makePatch.js:58:13)
    at Object.makePatch [as default] ([REDACTED]\WebApp\node_modules\patch-package\dist\makePatch.js:71:9)
    at [REDACTED]\WebApp\node_modules\patch-package\dist\index.js:20:32
    at Array.forEach (native)
    at Object.<anonymous> ([REDACTED]\WebApp\node_modules\patch-package\dist\index.js:19:22)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)

cwd: 'C:\\Users\\Andrey\\AppData\\Local\\Temp\\tmp-717323zCq3bl394D3'

The path actually does exist under that temp directory (while script is running), and if I update source to force / instead of path.join (that produces \) it works.

Not sure if that's the right solution or there is some kind of extra escaping required.

@ds300
Copy link
Owner

ds300 commented Aug 4, 2017

I don't have access to a windows box to debug on. Could you provide any more concrete advice? If not I can probably find an old windows laptop somewhere, but it might take a while.

@ashmind
Copy link
Contributor Author

ashmind commented Aug 4, 2017

@ds300 Sure, I'll try to do a PR, just not sure if my solution would be the best one.

ashmind added a commit to ashmind/patch-package that referenced this issue Aug 4, 2017
ashmind added a commit to ashmind/patch-package that referenced this issue Aug 5, 2017
…roperly and replaced patch with git apply.
@ashmind
Copy link
Contributor Author

ashmind commented Aug 5, 2017

@ds300 Made a PR at #9.

ashmind added a commit to ashmind/patch-package that referenced this issue Aug 5, 2017
…roperly and replaced patch with git apply.
ashmind added a commit to ashmind/patch-package that referenced this issue Aug 8, 2017
…roperly and replaced patch with git apply.
ds300 pushed a commit that referenced this issue Aug 8, 2017
@ashmind
Copy link
Contributor Author

ashmind commented Aug 8, 2017

This can also be closed now :)

@ashmind ashmind closed this as completed Aug 8, 2017
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