Skip to content
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

Fix argument passing to scripts being interpreted with '#!' shebang lines #167

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

anholt
Copy link
Contributor

@anholt anholt commented Sep 29, 2024

Description

I refactored script vs ELF handling as part of some ELF loading work I was doing, and it revealed that we were ignoring the original argv[] of a script that got interpreted based on its '#!' line. Add an integration test that passed on Linux and failed on kerla, and fix the bug.

Pre-Submission Checklist

When you submit a PR, please make sure your PR satisfies the following checklist:

  • I assert this contribution was authored by me.
  • I license this contribution under the license of this project.
  • The PR title describes your changes briefly and uses the present tense, without a trailing full stop.
  • The PR description describes the reason why we need the change.
  • This is an isolated change. No multiple changes and no unrelated changes are included.
  • Fixed all cargo clippy warnings.
  • Applied rustfmt.

This makes it more clear what code is doing what, and highlights that
scripts aren't getting passed their arguments.
Includes an integration test that passes on Linux as well.
Copy link
Owner

@nuta nuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@nuta nuta merged commit bc2c48c into nuta:main Oct 4, 2024
2 checks passed
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.

2 participants