mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 13:14:15 +02:00
improvement: replacing subprocess commands to detected installed CLIs by Python faster native calls (shutil.which)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from bauh.commons.system import run_cmd
|
||||
import shutil
|
||||
|
||||
|
||||
def is_available() -> bool:
|
||||
res = run_cmd('which npm', print_error=False)
|
||||
return res and not res.strip().startswith('which ')
|
||||
return bool(shutil.which('npm'))
|
||||
|
||||
Reference in New Issue
Block a user