Skip to content

fix(cli): propagate child exit code from piano profile#211

Merged
rocketman-code merged 1 commit intomainfrom
fix/propagate-exit-code
Mar 1, 2026
Merged

fix(cli): propagate child exit code from piano profile#211
rocketman-code merged 1 commit intomainfrom
fix/propagate-exit-code

Conversation

@rocketman-code
Copy link
Owner

Summary

  • piano profile now exits with the profiled program's exit code when it exits non-zero (previously always exited 0)
  • --ignore-exit-code suppresses both the warning and exit code propagation
  • Fixed NoRuns suppression when --ignore-exit-code is set: a failed program that produces no data no longer triggers NoDataWritten

Test plan

  • profile_propagates_child_exit_code — verifies Piano exits code 1 when child exits 1
  • profile_ignore_exit_code_returns_success — verifies Piano exits 0 with --ignore-exit-code
  • All 10 run_cmd tests pass
  • Full workspace: 214 tests pass, clippy clean

Closes #93

When the profiled program exits non-zero, piano profile now exits with
the same code instead of always returning 0. The --ignore-exit-code flag
suppresses both the warning and the exit code propagation.

Also fixes NoRuns suppression when --ignore-exit-code is set: a failed
program that produces no profiling data no longer triggers NoDataWritten.

Closes #93
@rocketman-code rocketman-code force-pushed the fix/propagate-exit-code branch from e3a7593 to 06903a9 Compare March 1, 2026 05:10
@rocketman-code rocketman-code merged commit 358440d into main Mar 1, 2026
6 checks passed
@rocketman-code rocketman-code deleted the fix/propagate-exit-code branch March 1, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

piano run: propagate instrumented binary's exit code

1 participant