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

Dynamically find sudo #1

Open
dubs3c opened this issue Oct 2, 2019 · 4 comments
Open

Dynamically find sudo #1

dubs3c opened this issue Oct 2, 2019 · 4 comments

Comments

@dubs3c
Copy link
Owner

dubs3c commented Oct 2, 2019

sudo may be in different locations on different systems, perhaps implement a function to locate it. Perhaps the output of which sudo can be used.

Right now /usr/bin/sudo is hardcoded.

@boxmein
Copy link

boxmein commented Oct 2, 2019

which just iterates over the "$PATH", right?

We can just use the user's PATH environment variable, tokenize it by colon, and then work through each folder to find the real sudo.

@dubs3c
Copy link
Owner Author

dubs3c commented Oct 2, 2019

Yes, that should do it. Something you want to implement? :)

@fluks
Copy link

fluks commented Oct 4, 2019

Yes, that should do it. Something you want to implement? :)

I can do it.

@dubs3c
Copy link
Owner Author

dubs3c commented Oct 4, 2019

@fluks Sure, unless @boxmein beats you to it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants