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

Don't call sudo when we're already root #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karolba
Copy link

@karolba karolba commented Nov 13, 2024

It's possible to execute actions inside a Docker container using (container:) - and it's possible (and I'd wager common) to already be root there and not have sudo available

Some GitHub Actions containers run on root and don't have `sudo` available
@unfor19
Copy link
Owner

unfor19 commented Nov 14, 2024

@karolba this looks like a great addition

Can you please add it as part of the inputs? I prefer not to break the app for users who want it to keep it running as it is. So if someone specifically wants to remove the sudo they can use a new input skipsudo: true and then it will act as you did.

If you update your PR to that, I will definitely merge it and release a new version 🙏🏻

@karolba
Copy link
Author

karolba commented Nov 14, 2024

@unfor19 Sure! Although: I don't think it's neccessary - I only skip sudo here if the user is already root and using sudo wouldn't change anything - especially because you have --preserve-env here.

If you think this needs to be in inputs anyway after reconsidering, then I'll add it there

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