You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\Composer\Util\Hg::getVersion doesn't parse that, resulting in
[RuntimeException]
hg was not found in your PATH, skipping source download
I don't know what the check is for anyway, the actual version doesn't seem used further... I would remove the check altogether, or usehg --version -q and update the parsing to allow for 6.2+.
I would also add a mechanism to specify hg, git etc. path, but especially hg because a lot of people use chg ( see https://www.mercurial-scm.org/wiki/CHg ) and alias hg=chg doesn't seem to work with symfony process.
The text was updated successfully, but these errors were encountered:
and alias hg=chg doesn't seem to work with symfony process.
bash aliases indeed don't work when launching a subprocess, because bash is not involved to process the command. However, if you create hg executable in your PATH that is a symlink to chg, this would work (for any tool relying on the PATH).
Regarding the version parsing, it indeed seems to missed support non-tag versions.
bash aliases indeed don't work when launching a subprocess
Yes, sometimes process helpers do sh -c command to get around this... I personally don't find it a good idea, and anyway, this is beyond the point.
A way to specify the hg path via env or config variables seems more than welcome though. I see in Fedora 36, it seems we have mercurial and mercurial-chg packages... chg needs the path to hg... While it can be compiled with an absolute path to /usr/local/bin/hg, I don't think it is (too lazy to check right now), so it might go into a self-loop trying to call the original hg.
I don't use the official repos and routinely compile from the stable branch with rust, so I did a mv hg hg_slow && mv chg hg (and compiled chg with the path to hg_slow) to get around hardcoded hg calls.
Fixed the version parsing as that's an easy one and definitely a bug. Allowing customizing path though is more work and frankly I am not sure it's needed/worth it. The PATH is how this should work.
Adding support for chg might be a thing.. but that also sounds like more work I'd like to do on this given 99% of Composer users are using git.
When compiling mercurial from, say, https://www.mercurial-scm.org/repo/hg/archive/stable.tar.gz :
\Composer\Util\Hg::getVersion
doesn't parse that, resulting inI don't know what the check is for anyway, the actual version doesn't seem used further... I would remove the check altogether, or use
hg --version -q
and update the parsing to allow for6.2+
.I would also add a mechanism to specify
hg
,git
etc. path, but especiallyhg
because a lot of people usechg
( see https://www.mercurial-scm.org/wiki/CHg ) andalias hg=chg
doesn't seem to work with symfony process.The text was updated successfully, but these errors were encountered: