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

better xtask run as sudo command #316

Merged
merged 2 commits into from
Sep 26, 2024
Merged

better xtask run as sudo command #316

merged 2 commits into from
Sep 26, 2024

Conversation

banditopazzo
Copy link
Member

This PR makes more flexible the xtask command to run binaries (examples, etc..) with root privileges.

It's using sudo -E as before, setting the target.<target-triple>.runner when it's required.

In this way we avoid a persistent runner and basically we have a clone of cargo run command in case we need to pass additional flags, for example features via --features <FEATURES> on the command line.

@banditopazzo banditopazzo self-assigned this Sep 24, 2024
@banditopazzo banditopazzo added the enhancement New feature or request label Sep 24, 2024
Copy link
Member

@vadorovsky vadorovsky left a comment

Choose a reason for hiding this comment

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

Just one comment, otherwise looks good

xtask/src/surun.rs Show resolved Hide resolved
Copy link
Member

@vadorovsky vadorovsky left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@vadorovsky vadorovsky merged commit df0deed into main Sep 26, 2024
21 checks passed
@vadorovsky vadorovsky deleted the better_xtask_sudo_run branch September 26, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants