MCPcopy Create free account
hub / github.com/boostorg/build / check_tool

Function check_tool

v2/tools/common.py:414–424  ·  view source on GitHub ↗

Checks that a tool can be invoked by 'command'. If command is not an absolute path, checks if it can be found in 'path'. If comand is absolute path, check that it exists. Returns 'command' if ok and empty string otherwise.

(command)

Source from the content-addressed store, hash-verified

412
413# ported from trunk@47281
414def check_tool(command):
415 """ Checks that a tool can be invoked by 'command'.
416 If command is not an absolute path, checks if it can be found in 'path'.
417 If comand is absolute path, check that it exists. Returns 'command'
418 if ok and empty string otherwise.
419 """
420 assert(isinstance(command, list))
421 assert(all(isinstance(c, str) for c in command))
422 #FIXME: why do we check the first and last elements????
423 if check_tool_aux(command[0]) or check_tool_aux(command[-1]):
424 return command
425
426# ported from trunk@47281
427def handle_options(tool, condition, command, options):

Callers 1

Calls 1

check_tool_auxFunction · 0.85

Tested by

no test coverage detected