mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-16 02:26:13 +01:00
osc ci improve error message on fail
The error message if the call of _commit is just: "ERROR: service run failed" One option why this can fail is that the user Editor in env('EDITOR') is not present. We check now if e.msg gives a hint about "not found file" and then error out with a better error message
This commit is contained in:
parent
6f34f2b8d8
commit
055b76bfa6
@ -4773,6 +4773,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
try:
|
||||
self._commit(subcmd, opts, args)
|
||||
except oscerr.ExtRuntimeError as e:
|
||||
pattern = re.compile("No such file")
|
||||
if "No such file" in e.msg:
|
||||
editor = os.getenv('EDITOR', default=get_default_editor())
|
||||
print("Editor %s not found" % editor)
|
||||
return 1
|
||||
print("ERROR: service run failed", e, file=sys.stderr)
|
||||
return 1
|
||||
except oscerr.PackageNotInstalled as e:
|
||||
|
Loading…
Reference in New Issue
Block a user