Skip to content

fix(cheatcodes): enforce exit code check for ffiCall #10571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

tomasandroil
Copy link

  • Added a check for output.exitCode != 0 in ffiCall.
  • If the exit code is non-zero, the error is returned with the stderr content.
  • The existing behavior for tryFfiCall remains unchanged (no exit code enforcement).

This makes ffiCall behavior safer and better aligned with expected shell semantics.

@tomasandroil
Copy link
Author

Quick reminder about PR #10571 (“fix(cheatcodes): enforce exit code check for ffiCall”):

  • Now returns an error if ffiCall exits with a non-zero code, including stderr output
  • Preserves existing tryFfiCall behavior (no exit code enforcement)

This aligns ffiCall with standard shell semantics. Let me know if you need any changes! 🔍

@DaniPopes
Copy link
Member

Thanks for the contribution, however this is superseded by #11101 which also adds a test.

@DaniPopes DaniPopes closed this Aug 12, 2025
@github-project-automation github-project-automation bot moved this to Done in Foundry Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants