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

Shebang parsing doesn't work for binary files #8

Closed
jyn514 opened this issue Jun 22, 2019 · 7 comments
Closed

Shebang parsing doesn't work for binary files #8

jyn514 opened this issue Jun 22, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@jyn514
Copy link
Contributor

jyn514 commented Jun 22, 2019

String only works on valid UTF-8 :(

@panicbit
Copy link

I'd like to look into this.

@panicbit
Copy link

If this project isn't completely abandoned...

@jyn514
Copy link
Contributor Author

jyn514 commented Oct 13, 2020

@panicbit right - I have an open PR at #9 but it hasn't been reviewed in a year.

@oxr463
Copy link
Contributor

oxr463 commented Oct 14, 2020

@panicbit @jyn514 I would gladly assign either of you maintainer access for this rust implementation. I am currently the only "active" maintainer and to be honest, I barely have bandwidth for the main implementation.

@oxr463 oxr463 assigned oxr463 and unassigned oxr463 Mar 25, 2021
@oxr463
Copy link
Contributor

oxr463 commented Mar 25, 2021

@KB5201314 has this been resolved with #14?

@imlk0
Copy link
Collaborator

imlk0 commented Mar 25, 2021

@KB5201314 has this been resolved with #14?

No, there still seems to be a problem with this part, because the args are not handled properly.

let mut argv = PathBuf::from(path.as_bstr().to_path().unwrap());
argv.push(arg.as_bstr().to_path().unwrap()); // FIXME: why append arg here?
Ok(Some(argv))

The current code will process #!/bin/sh -x into /bin/sh/-x

Maybe we have to replace the return value of this function from Result<Option<PathBuf>> with something else. Maybe Result<Option<(PathBuf, Bstring)>>?

@imlk0
Copy link
Collaborator

imlk0 commented Jul 30, 2021

Fixed in #47

@imlk0 imlk0 closed this as completed Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants