Skip to content

Commit fde4060

Browse files
committed
Fix _pipepager() to work with multi-call binaries
Programs such as BusyBox, Toybox and Coreutils (also gzib, bzip etc) in multi-call mode derive their identity from the symlink. Resolving the symlink causes them to misbehave.
1 parent 2d610e3 commit fde4060

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/click/_termui_impl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,9 @@ def _pipepager(
427427
cmd_filepath = which(cmd)
428428
if not cmd_filepath:
429429
return False
430-
# Resolves symlinks and produces a normalized absolute path string.
431-
cmd_path = Path(cmd_filepath).resolve()
430+
431+
# Produces a normalized absolute path string.
432+
cmd_path = Path(cmd_filepath).absolute()
432433
cmd_name = cmd_path.name
433434

434435
import subprocess

0 commit comments

Comments
 (0)