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

chroot: set trailing var arg #3907

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

tertsdiepraam
Copy link
Member

Closes #3783

In the issue the -c flag should be passed to /bin/sh and not be parsed by chroot. This is fixed by simply allowing hyphen values.

@Lunarequest, could you verify that this solves the issue?

@tertsdiepraam
Copy link
Member Author

Okay, I think this needs a slightly different approach (though still one line). Ill update the PR soon.

Without trailing var arg set in clap, flags in the command argument are
incorrectly parsed by clap.
@tertsdiepraam tertsdiepraam changed the title chroot: allow hyphen values in command chroot: set trailing var arg Sep 9, 2022
@tertsdiepraam
Copy link
Member Author

I solved it with the trailing_var_arg setting instead of allow_hyphen_values, which is the proper way to do this in clap. I also checked the other utils that take commands as arguments (nice, timeout, runcon) and they all already do this. chroot seems to be the odd one out.

@sylvestre
Copy link
Contributor

oh, cool, i didn't get this :)

@sylvestre sylvestre merged commit adc4ecd into uutils:main Sep 21, 2022
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.

chroot -c error's out when it should run what is supplied after
2 participants