pkgxdev / pkgx

run anything
https://pkgx.sh
Apache License 2.0
8.96k stars 1.36k forks source link

`git gui` not working #1041

Open fengjianyun opened 3 days ago

fengjianyun commented 3 days ago

I'm very new to pkgx. Thank you for developping such a wonderful tool.

I try to use it with an old Spring boot project, and I've created a .pkgx.yml with only two dependencies:

dependencies:
  java@11 mvn@3.6

And I've used dev to initialize the environment.

The mvn commands work like a charm. But git gui doesn't work any more.

$ git gui
fatal: 'gui' appears to be a git command, but we were not
able to execute it. Maybe git-gui is broken?

With which git, I can find that it's git installed by pkgx is used. /home/xx/.pkgx/git-scm.org/v2.47.0/bin/git

As a workarond, I can run env -git to use my global git without any problem. So how can I do that in .pkgx.yml to tell pkgx not to install a local git.

Thank you very much.

fengjianyun commented 3 days ago

The pkgx version is 1.2.2

jhheider commented 3 days ago

Hm. I don't see git in my environment with that .pkgx.yml, albeit on macOS. I would do a dev off; echo $PATH | tr ':' '\n' | grep git-scm and ensure it's not coming in some other way. You should be able to check that again after doing dev as well.

jhheider commented 3 days ago

we have an open ticket on pantry to complete git-gui, so packaging that is another option, but that doesn't solve your mystery, only your outcome.

mxcl commented 3 days ago

Where is git-gui installed?

fengjianyun commented 1 day ago

Sorry, I've forgotten to mention that I use WSL 2 (Ubuntu).

I think it's added because of the .git directory.

I don't know. With which git-gui, no result is displayed in the dev enabled directory or an ordinary directory.

fengjianyun commented 1 day ago

Hm. I don't see git in my environment with that .pkgx.yml, albeit on macOS. I would do a dev off; echo $PATH | tr ':' '\n' | grep git-scm and ensure it's not coming in some other way. You should be able to check that again after doing dev as well.

I tested the command.

with dev off, there's no git-scm found. The output is

env -openjdk.org^21 -maven.apache.org~3.9 -git-scm.org

After dev, the output of echo $PATH | tr ':' '\n' | grep git-scm is

/home/xx/.pkgx/git-scm.org/v2.47.0/bin