Skip to content

Commit f9056f1

Browse files
authored
Use shutil.which instead of command -v (#32)
1 parent 51eaf1d commit f9056f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shelloracle/bootstrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import subprocess
1+
import shutil
22
from pathlib import Path
33

44
from prompt_toolkit import print_formatted_text
@@ -26,7 +26,7 @@ def replace_home_with_tilde(path: Path) -> Path:
2626
def get_installed_shells() -> list[str]:
2727
shells = []
2828
for shell in supported_shells:
29-
if subprocess.run(["command", "-v", shell], stdout=subprocess.DEVNULL):
29+
if shutil.which(shell):
3030
shells.append(shell)
3131
return shells
3232

0 commit comments

Comments
 (0)