Skip to content

Commit

Permalink
Report errors when repositories cannot be cloned during ecosystem che…
Browse files Browse the repository at this point in the history
…cks (#9314)

Otherwise, the directory is just missing later and you need to dig
through logs to understand why.
  • Loading branch information
zanieb authored Dec 30, 2023
1 parent fca9dc5 commit c01bb0d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions python/ruff-ecosystem/ruff_ecosystem/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,17 @@ async def clone(self: Self, checkout_dir: Path) -> ClonedRepository:
)

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 (
Expand Down

0 comments on commit c01bb0d

Please sign in to comment.