mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
ssh: Print details if running the command fails
Change-Id: I87adbdd5fe4eb2709c97ab4c21b414145acf788b Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/392915 Reviewed-by: Mike Frysinger <vapier@google.com> Reviewed-by: Tuan Vo Hung <vohungtuan@gmail.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This commit is contained in:
parent
4b01a242d8
commit
fff1d2d74c
8
ssh.py
8
ssh.py
@ -57,8 +57,12 @@ def version():
|
||||
except FileNotFoundError:
|
||||
print("fatal: ssh not installed", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
except subprocess.CalledProcessError:
|
||||
print("fatal: unable to detect ssh version", file=sys.stderr)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(
|
||||
"fatal: unable to detect ssh version"
|
||||
f" (code={e.returncode}, output={e.stdout})",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user