Skip to content
Myr

Fix _pipepager()/_tempfilepage() to work with multi-call binaries (#2944)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Rowlando13 · committed by GitHub · parents 413f76f, 34723d1 · Browse files · 1 file+9 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−4 removed

  • other:+9 added−4 removed

1 file+9 added−4 removed

modified:src/click/_termui_impl.py+9 added-4 removed
427 unmodified lines
428429 cmd_filepath = shutil.which(cmd)430 if not cmd_filepath:431 return False432 # Resolves symlinks and produces a normalized absolute path string.433 cmd_path = Path(cmd_filepath).resolve()432433 # Produces a normalized absolute path string.434 # multi-call binaries such as busybox derive their identity from the symlink435 # less -> busybox. resolve() causes them to misbehave. (eg. less becomes busybox)436 cmd_path = Path(cmd_filepath).absolute()437 cmd_name = cmd_path.name438439 import subprocess440
81 unmodified lines
522523 cmd_filepath = shutil.which(cmd)524 if not cmd_filepath:525 return False523 # Resolves symlinks and produces a normalized absolute path string.524 cmd_path = Path(cmd_filepath).resolve()526 # Produces a normalized absolute path string.527 # multi-call binaries such as busybox derive their identity from the symlink528 # less -> busybox. resolve() causes them to misbehave. (eg. less becomes busybox)529 cmd_path = Path(cmd_filepath).absolute()530531 import subprocess532 import tempfile533
319 unmodified lines