Giter VIP home page Giter VIP logo

Comments (6)

shiftkey avatar shiftkey commented on July 26, 2024

@kittaakos ah, I think I know this one.

We set GIT_EXEC_PATH to the same known location, and at least on macOS this path may be something different. You can check this by running git --exec-path:

$ git --exec-path
/usr/local/Cellar/git/2.14.1/libexec/git-core

Two potential ways out of this:

  • don't set GIT_EXEC_PATH if you already have LOCAL_GIT_DIRECTORY set, assume the user has configured Git correctly
  • run git --exec-path and set it as an environment variable if you have LOCAL_GIT_DIRECTORY set

from dugite.

kittaakos avatar kittaakos commented on July 26, 2024

Thank you, @shiftkey! Both approaches work perfectly. I would say; when one sets the GIT_LOCAL_DIRECTORY variable one should be aware of setting the GIT_EXEC_PATH environment variable too.

Unfortunately, even if I set both environment variables, the GIT_EXEC_PATH gets overridden here.

The following would be my expectation about the behavior; when the custom GIT_EXEC_PATH is set, then dugite itself does not try to locate it again, but blindly uses the user specified path, just like with the LOCAL_GIT_DIRECTORY .

Would that change make sense to you? Do you accept contributions? Also, please correct me if I misunderstood something. Thanks in advance!

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

Would that change make sense to you?

Yes! This makes sense, it was just me not considering the full range of scenarios. And I like respecting the existing environment variable, as it avoids us executing a git --exec-path ourselves.

Do you accept contributions?

I do! Happy to review and work with you on a fix if you're feeling up to it!

from dugite.

kittaakos avatar kittaakos commented on July 26, 2024

Awesome! I was put on another project, but I do my best to come up with a PR in this week. Bear with me.

from dugite.

kittaakos avatar kittaakos commented on July 26, 2024

PR: #114.

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

Fixed by #114

from dugite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.