def require_command(
runner: Runner, command: str, message: Optional[str] = None
):
if message is None:
message = "Please install " + command
try:
runner.get_output(["which", command])
except CalledProcessError as e:
sys.stderr.write(message + "\n")
sys.stderr.write(
'(Ran "which {}" to check in your $PATH.)\n'.format(command)
)
sys.stderr.write(
"See the documentation at https://telepresence.io "
"for more details.\n"
)
raise SystemExit(1)
评论列表
文章目录