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

How to use dugite with the locally available and configured git executable? #111

Closed
kittaakos opened this issue Aug 17, 2017 · 4 comments
Closed

Comments

@kittaakos
Copy link
Contributor

I am trying to use dugite with the local git executable if available, if not, simply fall back to the one shipped with your library.

I already have some logic that tries to locate the executable. Let assume, it works correctly on all platforms, and it returns with /usr/local/bin/git in my case. When I set the executable path to the LOCAL_GIT_DIRECTORY environment variable, then the resolveGitBinary function in the git-environment module appends the bin/git to the path. The execution obviously fails, because git is not available under /usr/local/bin/git/bin/git.

Is there a way to avoid doing that? It would be great, to have an option to set a LOCAL_GIT_PATH variable too (or something similar), and if that is present, use that without any modifications. Or did I completely misunderstand how to configure and use a custom git executable from dugite?

Any feedbacks are much appreciated! Cheers.

@shiftkey
Copy link
Member

@kittaakos the back story on this LOCAL_GIT_DIRECTORY environment variable is in #85, and it talks about the stuff that needs to be set when invoking Git - it was simpler to work from a root directory rather than the executable location.

You should be able to do LOCAL_GIT_DIRECTORY=/usr/local - let me know if you encounter any other issues with that approach.

@kittaakos
Copy link
Contributor Author

Thank you, @shiftkey! I have to try it with the git directory on all three platforms instead. I close this now, and if I encounter any problems, I will reopen this (or a new) ticket.

@kittaakos
Copy link
Contributor Author

I just wanted to confirm, that it works perfectly. Thanks again!

@shiftkey
Copy link
Member

@kittaakos you're welcome - good luck!

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