Commit 5f2a1bc
Zo Bot
fix Windows short-circuit in man_pages.is_available
is_available guarded against Windows with `os.system == 'nt'`. os.system
is the built-in function object from the os module, never a string, so
the comparison was always False and the function never short-circuited
on Windows even though that was clearly the author's intent (the
surrounding code is checking whether the running OS has the `man`
binary). On Windows the function fell through to `subprocess.run([MAN_COMMAND, ...])`,
which is missing from PATH and raised FileNotFoundError that was then
swallowed by the bare `except Exception`, so users saw a confusing
'no man pages found' instead of an immediate 'not on Windows' early
return.1 parent 5b604c3 commit 5f2a1bc
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments