mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
typing
This commit is contained in:
+4
-2
@@ -188,8 +188,10 @@ def cecho(message, color=NO_COLOR):
|
|||||||
logger.info(f"{color}{message}\033[0m")
|
logger.info(f"{color}{message}\033[0m")
|
||||||
|
|
||||||
|
|
||||||
def which(cmd):
|
def which(cmd: str) -> Union[str, None]:
|
||||||
for path in os.getenv("PATH").split(":"):
|
PATH = os.getenv("PATH")
|
||||||
|
assert PATH
|
||||||
|
for path in PATH.split(":"):
|
||||||
if os.path.exists(path) and cmd in os.listdir(path):
|
if os.path.exists(path) and cmd in os.listdir(path):
|
||||||
return cmd
|
return cmd
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user