MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / is_installed

Function is_installed

code2flow/model.py:30–42  ·  view source on GitHub ↗

Determine whether a command can be run or not :param list[str] individual_files: :rtype: str

(executable_cmd)

Source from the content-addressed store, hash-verified

28
29
30def is_installed(executable_cmd):
31 """
32 Determine whether a command can be run or not
33
34 :param list[str] individual_files:
35 :rtype: str
36 """
37 for path in os.environ["PATH"].split(os.pathsep):
38 path = path.strip('"')
39 exe_file = os.path.join(path, executable_cmd)
40 if os.path.isfile(exe_file) and os.access(exe_file, os.X_OK):
41 return True
42 return False
43
44
45def djoin(*tup):

Callers 4

assert_dependenciesMethod · 0.85
assert_dependenciesMethod · 0.85
assert_dependenciesMethod · 0.85
code2flowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected