fix: return which(cmd) instead of the original cmd

This commit is contained in:
Travis Abendshien
2026-07-04 16:39:54 -07:00
parent 876538bfa6
commit d6cfdc0530
2 changed files with 5 additions and 5 deletions

View File

@@ -53,7 +53,7 @@ class ModuleStatus:
"""
if platform.system() == "Darwin":
for loc in _MACOS_BIN_LOCATIONS:
if which(loc + cmd):
cmd = loc + cmd
break
return cmd
full_command = which(loc + cmd)
if full_command:
return full_command
return which(cmd)

View File

@@ -11,7 +11,7 @@ def test_github_api_unavailable(qtbot: QtBot, mocker) -> None:
mocker.patch(
"requests.get",
side_effect=ConnectionError(
"Failed to resolve 'api.github.com' ([Errno -3] Temporary failure in name resolution)"
"Emulating a failure with 'api.github.com' ([Errno 0] This should be handled)"
),
)
modal = AboutModal("/tmp")