Instruction for adding git-cinnabar to PATH includes both slash and backslash in the path on windows
Categories
(Firefox Build System :: Bootstrap Configuration, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: arai, Unassigned)
References
Details
On windows, running bootstrap with git repository shows the following at the end.
there the path to git-cinnabar contains both slash and backslash.
To add git-cinnabar to the PATH, edit your shell initialization script, which
may be called ~/.bashrc or ~/.bash_profile or ~/.profile, and add the following
lines:
export PATH="c:/Users/USER/.mozbuild\git-cinnabar:$PATH"
Then restart your shell.
it's because we use os.path.join
to create the path, that uses backslash on windows.
def update_git_tools(git, root_state_dir):
"""Update git tools, hooks and extensions"""
# Ensure git-cinnabar is up to date.
cinnabar_dir = os.path.join(root_state_dir, "git-cinnabar")
Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
This will be resolved when we migrate to pathlib
for consistently handling paths.
Though, I'm curious: msys is pretty intelligent at handling Windowsy-Linux-isms - does it behave properly with a PATH
with both front- and back-slashes?
Reporter | ||
Comment 2•4 years ago
•
|
||
Yeah, the backslash seems to work there (to be clear, after addressing bug 1737112).
so this isn't blocking bug.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #1)
This will be resolved when we migrate to
pathlib
for consistently handling paths.
It that particular case, that's probably not true, because pathlib would consistently use backslashes, which aren't appropriate in that specific context.
Comment 4•4 years ago
|
||
It that particular case, that's probably not true, because pathlib would consistently use backslashes, which aren't appropriate in that specific context.
Pathlib will at least ensure path separator consistency. We will still have to ensure that displayed/exported paths used by msys
follow msys's rules - which is essentially represented in part by bug 1737112.
The inconsistency in paths will be resolved by pathlib
.
Description
•