mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
maintainers/scripts/update: Do not try to print error when there is not one
This can happen e.g. due to an error during `merge_changes` since we do not do `stderr=PIPE` for git commands.
This commit is contained in:
@@ -93,14 +93,19 @@ async def run_update_script(
|
||||
raise asyncio.exceptions.CancelledError()
|
||||
except CalledProcessError as e:
|
||||
eprint(f" - {package['name']}: ERROR")
|
||||
eprint()
|
||||
eprint(f"--- SHOWING ERROR LOG FOR {package['name']} ----------------------")
|
||||
eprint()
|
||||
eprint(e.stderr.decode("utf-8"))
|
||||
with open(f"{package['pname']}.log", "wb") as logfile:
|
||||
logfile.write(e.stderr)
|
||||
eprint()
|
||||
eprint(f"--- SHOWING ERROR LOG FOR {package['name']} ----------------------")
|
||||
if e.stderr is not None:
|
||||
eprint()
|
||||
eprint(
|
||||
f"--- SHOWING ERROR LOG FOR {package['name']} ----------------------"
|
||||
)
|
||||
eprint()
|
||||
eprint(e.stderr.decode("utf-8"))
|
||||
with open(f"{package['pname']}.log", "wb") as logfile:
|
||||
logfile.write(e.stderr)
|
||||
eprint()
|
||||
eprint(
|
||||
f"--- SHOWING ERROR LOG FOR {package['name']} ----------------------"
|
||||
)
|
||||
|
||||
if not keep_going:
|
||||
raise UpdateFailedException(
|
||||
|
||||
Reference in New Issue
Block a user