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

Elevate a particular command instead of entire script? #20

Open
makeasnek opened this issue Dec 9, 2022 · 2 comments
Open

Elevate a particular command instead of entire script? #20

makeasnek opened this issue Dec 9, 2022 · 2 comments

Comments

@makeasnek
Copy link

Just came across this library, it looks like it does exactly what I need. Is there a way to call this to elevate a specific command? I don't need my entire script to run as root, just one command (to call a shell script on an OS X system). Thank you!

@catb0t
Copy link

catb0t commented Dec 9, 2022

hi makeasnek

if stdin is still connected to a tty, then putting sudo in front of the command that needs to be elevated should work, and you will be prompted for a password

@makeasnek
Copy link
Author

Thank you for the tip and your reply. For this particular use case I'm pretty sure I'll need to get the standard GUI prompt which is why I was excited to use this library for it.

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

No branches or pull requests

2 participants