diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2023-11-15 15:51:33 +0100 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-03-11 16:40:55 +0000 |
commit | fff1d2d74c2078b62cc9c2561330e41a842dc197 (patch) | |
tree | cc737a90669501a0d12f80a2ef86ac7f0d981d6c | |
parent | 4b01a242d822bedee207cb8ed568f45741777930 (diff) | |
download | git-repo-fff1d2d74c2078b62cc9c2561330e41a842dc197.tar.gz |
ssh: Print details if running the command failsv2.44
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>
-rw-r--r-- | ssh.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -57,8 +57,12 @@ def version(): | |||
57 | except FileNotFoundError: | 57 | except FileNotFoundError: |
58 | print("fatal: ssh not installed", file=sys.stderr) | 58 | print("fatal: ssh not installed", file=sys.stderr) |
59 | sys.exit(1) | 59 | sys.exit(1) |
60 | except subprocess.CalledProcessError: | 60 | except subprocess.CalledProcessError as e: |
61 | print("fatal: unable to detect ssh version", file=sys.stderr) | 61 | print( |
62 | "fatal: unable to detect ssh version" | ||
63 | f" (code={e.returncode}, output={e.stdout})", | ||
64 | file=sys.stderr, | ||
65 | ) | ||
62 | sys.exit(1) | 66 | sys.exit(1) |
63 | 67 | ||
64 | 68 | ||