mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1815799 - Fix fzf preview on Windows. r=firefox-build-system-reviewers,ahochheiden
fzf doesn't quote the preview command arguments, so if you have windows-style paths given to a unix-style shell, the slashes are completely gone. This happens on multiple systems, both with MozillaBuild and external MSYS2 shell. fzf respects the SHELL environment variable, so to fix it, execute the command using cmd.exe on Windows, via $COMSPEC. Depends on D169264 Differential Revision: https://phabricator.services.mozilla.com/D169265
This commit is contained in:
parent
503554894e
commit
b0c0bff90b
@ -330,6 +330,11 @@ def run_fzf(cmd, tasks):
|
||||
env.update(
|
||||
{"PYTHONPATH": os.pathsep.join([p for p in sys.path if "requests" in p])}
|
||||
)
|
||||
# Make sure fzf uses Windows' shell rather than MozillaBuild bash or
|
||||
# whatever our caller uses, since it doesn't quote the arguments properly
|
||||
# and thus windows paths like: C:\moz\foo end up as C:mozfoo...
|
||||
if platform.system() == "Windows":
|
||||
env["SHELL"] = env["COMSPEC"]
|
||||
proc = subprocess.Popen(
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user