DomT4 / homebrew-autoupdate

:tropical_drink: An easy, convenient way to automatically update Homebrew.
BSD 2-Clause "Simplified" License
1.01k stars 55 forks source link

password gui with pinentry-mac for handling Casks that require sudo #110

Closed swissbuechi closed 10 months ago

swissbuechi commented 11 months ago

Solves Issue https://github.com/Homebrew/homebrew-autoupdate/issues/40

You can now pass the argument --sudo to the start command. If a Cask requires sudo, pinetry-mac will open a gui to ask for the password: image

swissbuechi commented 11 months ago

The users currently need to manually run brew install pinentry-mac. Should I add a check if pinentry-mac is installed and display a hint to the users? (Only if the --sudo argument is used) Or should we auto-install the dependency if it is missing?

MikeMcQuaid commented 11 months ago

Should I add a check if pinentry-mac is installed and display a hint to the users? (Only if the --sudo argument is used) Or should we auto-install the dependency if it is missing?

Up to @DomT4 but I think at least it should check in the code.

swissbuechi commented 11 months ago

The window spawned by pinentry-mac steals the focus, and also you can not minimize it. I will look into the docs, maybe there is an option to enable the minimize button.

swissbuechi commented 11 months ago

The window spawned by pinentry-mac steals the focus, and also you can not minimize it. I will look into the docs, maybe there is an option to enable the minimize button.

Focus: --no-global-grab option is already set 👍🏻 Minimize: This is currently not possible with pinentry-mac

DomT4 commented 11 months ago

This is good work, thank you @swissbuechi. Sort of held off moving on this broader issue because I was trying to think of something both native and lightweight, and never really found anything I was happy with. Agree this is at least better than the status quo and a very visible improvement to the end user.

Will give this another glance over no later than Wednesday but from quick glance it looks like a better workaround than anything I've cooked up 😄.

Thanks for the code review @MikeMcQuaid 🙌🏻

swissbuechi commented 11 months ago

This is good work, thank you @swissbuechi. Sort of held off moving on this broader issue because I was trying to think of something both native and lightweight, and never really found anything I was happy with. Agree this is at least better than the status quo and a very visible improvement to the end user.

Will give this another glance over no later than Wednesday but from quick glance it looks like a better workaround than anything I've cooked up 😄.

Thanks for the code review @MikeMcQuaid 🙌🏻

@DomT4 thank you 👍🏻 I'm looking forward to your review.

A litte bit off-topic, but could you please unlock issue: https://github.com/Homebrew/homebrew-autoupdate/issues/59 ? I would like to discuss this and maybe create another PR to provide an option to use StartCalendarInterval. Maybe you also need to add some labels, so the bot won't auto-close it again.

Thanks.

MikeMcQuaid commented 11 months ago

A litte bit off-topic, but could you please unlock issue: #59 ?

@swissbuechi done, hope that's ok @DomT4, feel free to re-lock if not and: sorry!