Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hatch_rs/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def execute(self):
chdir(self.path)

for command in self.commands:
system_call(command)
ret = system_call(command)
if ret != 0:
raise RuntimeError(f"hatch-rs build command failed with exit code {ret}: {command}")

# Go back to original path
chdir(str(cwd))
Expand Down Expand Up @@ -164,7 +166,10 @@ def execute(self):
library_name = f"{self.module}/{file_name}.so"
self._libraries.append(library_name)
copy_command = f"cp -f {file} {cwd}/{library_name}"
system_call(copy_command)
ret = system_call(copy_command)
if ret != 0:
raise RuntimeError(f"hatch-rs copy command failed with exit code {ret}: {copy_command}")

return self.commands

def cleanup(self):
Expand Down