Skip to content

Commit d449f12

Browse files
nitins17Google-ML-Automation
authored andcommitted
Fix early exiting when building multiple wheels
PiperOrigin-RevId: 700711389
1 parent 8477580 commit d449f12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build/build.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,10 +598,12 @@ async def main():
598598
wheel_build_command.append(f"--jaxlib_git_hash={git_hash}")
599599

600600
result = await executor.run(wheel_build_command.get_command_as_string(), args.dry_run)
601+
# Exit with error if any wheel build fails.
601602
if result.return_code != 0:
602603
raise RuntimeError(f"Command failed with return code {result.return_code}")
603-
else:
604-
sys.exit(0)
604+
605+
# Exit with success if all wheels in the list were built successfully.
606+
sys.exit(0)
605607

606608

607609
if __name__ == "__main__":

0 commit comments

Comments
 (0)