Report errors when repositories cannot be cloned during ecosystem checks (#9314)

Otherwise, the directory is just missing later and you need to dig
through logs to understand why.
This commit is contained in:
Zanie Blue 2023-12-29 21:40:22 -06:00 committed by GitHub
parent fca9dc5ce2
commit c01bb0d485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -294,14 +294,17 @@ class Repository(Serializable):
)
process = await create_subprocess_exec(
*command, env={"GIT_TERMINAL_PROMPT": "0"}
*command,
env={"GIT_TERMINAL_PROMPT": "0"},
stdout=PIPE,
stderr=PIPE,
)
status_code = await process.wait()
logger.debug(
f"Finished cloning {self.fullname} with status {status_code}",
)
if await process.wait() != 0:
_, stderr = await process.communicate()
raise ProjectSetupError(
f"Failed to clone {self.fullname}: {stderr.decode()}"
)
# Configure git user — needed for `self.commit` to work
await (