Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion httpie/output/ui/man_pages.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Logic for checking and displaying man pages."""

import subprocess
import sys
import os
from httpie.context import Environment

Expand All @@ -18,7 +19,7 @@ def is_available(program: str) -> bool:
Check whether `program`'s man pages are available on this system.

"""
if NO_MAN_PAGES or os.system == 'nt':
if NO_MAN_PAGES or sys.platform == 'win32':
return False
try:
process = subprocess.run(
Expand Down
6 changes: 6 additions & 0 deletions tests/test_issue_1898_regression.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


def test_is_available_windows_guard_uses_sys_platform():
from httpie.output.ui.man_pages import is_available
import sys
assert sys.platform != 'win32' or is_available('man') == False
Loading