-
-
Notifications
You must be signed in to change notification settings - Fork 301
path seems not to be inherited when spawning git #181
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
Comments
haha yesss ❤️ this change makes sense, I'll fix it soon. Thanks for the report! 🙏 |
yeap having the same problem on nixos, which puts all custom executables in $PATH it seem to work for the other executables like npm, maybe it's because i have them installed through nix-shell, but git in my user profile? This fix might also be useful for the other executables too. @ds300 could you release this fix please? |
fix is merged, but not released. yet and much worse: you can't just use a fixed github dependency of patch-package:
wouldn't a npmignore entry do just the same, without that dep? |
Hi, first up, thanks for this awesome idea -- I only found patch-package a couple of days ago and I'm already in love! Simple but so useful. I'm looking forward to removing lots of forked dependencies from my repo in coming days!
I'm on a Mac, and when I first asked patch-package to create a patch, I got a strange error:
This is the output from /usr/bin/git, which is a small stub on Macs that asks the user to install Xcode. I already have the full git suite installed, and on my $PATH at /usr/local/bin/git, and I use VS Code, so I don't want to install Xcode too.
I found that if I change this line in makePatch.js
to
patch-package started running the correct version of git, and was able to create a patch.
I think the unchanged line might discard all existing environment variables in the spawned process, including $PATH. But I don't know how to be sure, because I can't spawn 'set' (it's a built-in) and if I spawn a sub-shell like 'bash -c set', it picks up the correct path from .bashrc.
Needless to say, after getting this working, I used patch-package to patch itself :-D
If you think this is not a bug please feel free to ignore me, it may just be something is weird or broken on my system! Thanks again
The text was updated successfully, but these errors were encountered: