setup/runcmd: Properly report errors, if running command is missing
We currently use subprocess.check_output() for running external command (git), and check_output() checks running command status code, as its name promises: https://github.com/python/cpython/blob/2.7/Lib/subprocess.py#L569 and reports it appropriately to user: https://github.com/python/cpython/blob/2.7/Lib/subprocess.py#L411 but if the command is not found, it is just single error: [Errno 2] No such file or directory which gets output to the log and it is not clear what command failed, or evern if it is from runcmd() call. Redo our runcmd() manually, so that it always report erros with context - what command it was trying to run. The error now becomes: RuntimeError: (['missing-command'],): [Errno 2] No such file or directory /cc @Tyagov
Showing