1
0
Fork 0

fixed command_exists always returning True

This commit is contained in:
Kim, Jimin 2022-05-06 18:59:32 +09:00
parent ddd8a95c00
commit 37545eaf53
2 changed files with 17 additions and 6 deletions

View file

@ -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
#