def _find_oc():
"""
Determine the path to oc command
Search /usr/bin:/usr/local/bin
Returns:
str: path to oc binary
"""
test_paths = ['/usr/bin/oc', '/usr/local/bin/oc']
for path in test_paths:
test_path = utils.get_path(path)
logger.debug("trying oc at " + test_path)
oc = test_path
if os.access(oc, os.X_OK):
logger.debug("found oc at " + test_path)
return oc
logger.fatal("No oc found in {}. Please provide corrent path to co "
"binary using --oc argument".format(":".join(test_paths)))
return None
评论列表
文章目录