[Bug 6870] New: hg command fails when installed on Unix with a space in the path
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Mon Mar 25 14:21:46 UTC 2024
https://bz.mercurial-scm.org/show_bug.cgi?id=6870
Bug ID: 6870
Summary: hg command fails when installed on Unix with a space
in the path
Product: Mercurial
Version: stable branch
Hardware: PC
OS: Mac OS
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: jaraco at jaraco.com
CC: mercurial-devel at mercurial-scm.org
Python Version: ---
Mercurial is affected by https://github.com/pypa/pipx/issues/1198.
When installing Mercurial using pipx 1.3 or later on macOS, Mercurial is
installed into a virtual env rooted at `~/Library/Application Support/pipx`.
Because Unix still [doesn't support spaces in
filenames](https://blog.jaraco.com/unix-doesnt-support-spaces-in-filenames/),
scripts that are installed with an explicit shebang (compared with managed
"console scripts"), the shebang ends up with spaces in it and the Mercurial
command fails:
```
~ @ bash -c "hg --help"
bash: line 1: /Users/jaraco/.local/bin/hg: cannot execute: required file not
found
```
It's possible pipx will fix the issue or Unix will fix the root issue, but in
the meantime, Mercurial should consider using console scripts to install "hg".
I know there's custom logic in "hg" to handle non-package install scenarios,
but maybe that logic can be sidelined - provided exceptionally for those
scenarios.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list