fixed command_exists
always returning True
This commit is contained in:
parent
ddd8a95c00
commit
37545eaf53
2 changed files with 17 additions and 6 deletions
4
setup.py
4
setup.py
|
@ -7,7 +7,7 @@ This file is all that's needed for execution.
|
|||
It'll download all the dependencies and related files automatically.
|
||||
"""
|
||||
|
||||
from os import system, geteuid
|
||||
from os import system, geteuid, popen
|
||||
from os.path import exists
|
||||
from shutil import rmtree
|
||||
import sys
|
||||
|
@ -21,7 +21,7 @@ tmp_dir = "/tmp/com.developomp.setup"
|
|||
|
||||
|
||||
def command_exits(command: str) -> bool:
|
||||
return system(f"command -v {command} &> /dev/null") == 0
|
||||
return len(popen(f"command -v {command}").readlines()) == 1
|
||||
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue