Issues with reset sudo timestamp added in #17694 #5528
Unanswered
viking1304
asked this question in
Everyday usage
Replies: 2 comments 1 reply
-
Any formula build can run any command. There is no way to know if something will run sudo or not. That's why it's needed before anything else is done. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Cross-linking to the workarounds posted in other issues: Homebrew/brew#17912 (comment) Sounds like using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
I was debugging strange behavior of one of my scripts that relies on Homebrew, and then I figured out that the source of my problem was this commit Homebrew/brew#17694
I understand why you did it and agree that should be the default behavior. Still, I would appreciate it if you could consider adding an option to restore the old behavior for script use.
In my scripts, I like to ask for the password at the beginning and then periodically update the timestamp in a background job. This way, the user can just enter the password and forget about the script instead of waiting to be asked for a password somewhere in the middle of the execution. I will remove this for now, but that is not a real issue.
The bigger issue is that using a simple command like brew list will reset the sudo timestamp. Even if I install a formula that does not require sudo, the sudo timestamp will also be reset.
Am I missing something obvious here, or was this really intended?
Beta Was this translation helpful? Give feedback.
All reactions