File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -429,8 +429,11 @@ def _pipepager(
429429 cmd_filepath = shutil .which (cmd )
430430 if not cmd_filepath :
431431 return False
432- # Resolves symlinks and produces a normalized absolute path string.
433- cmd_path = Path (cmd_filepath ).resolve ()
432+
433+ # Produces a normalized absolute path string.
434+ # multi-call binaries such as busybox derive their identity from the symlink
435+ # less -> busybox. resolve() causes them to misbehave. (eg. less becomes busybox)
436+ cmd_path = Path (cmd_filepath ).absolute ()
434437 cmd_name = cmd_path .name
435438
436439 import subprocess
@@ -520,8 +523,10 @@ def _tempfilepager(
520523 cmd_filepath = shutil .which (cmd )
521524 if not cmd_filepath :
522525 return False
523- # 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 symlink
528+ # less -> busybox. resolve() causes them to misbehave. (eg. less becomes busybox)
529+ cmd_path = Path (cmd_filepath ).absolute ()
525530
526531 import subprocess
527532 import tempfile
You can’t perform that action at this time.
0 commit comments