Brew: Alert when user input needed

Created on 27 Jun 2018  Â·  7Comments  Â·  Source: Homebrew/brew

Hey, all.

I propose that when user input is needed during installation/upgrading of packages (e.g. when a package installer requires the admin/sudo password), that a BEL character is printed to the screen to alert the user that their input is needed.

There have been several times when I have installed many packages simultaneously, only to leave brew running in the background, come back later, and see that not even the first package has been installed yet because I needed to input my password.

outdated

All 7 comments

Please always fill out the issue template (like it told you to). Homebrew without Cask never prompts for input. Homebrew Cask cannot bell in this case because it’s the installer rather than Homebrew Cask that prompts (correct me if I’m wrong @reitermarkus).

@MikeMcQuaid You are correct. Though in theory maybe we could do it, like beeping before any sudo operation. It’s also possible to make sudo password prompts beep, but it requires editing the sudoers file, which is not something we’re going to do.

@jivanpal At the moment, your best bet here is to run sudo --validate before those commands.

We also support SUDO_ASKPASS for unattended execution.

@MikeMcQuaid For reference, I did fill out the issue template (like it told me to).

~~~
Please replace this section with:

  • a detailed description of your proposed feature
  • the motivation for the feature
  • how the feature would be relevant to at least 90% of Homebrew users (if it's not: do not open a feature request)
  • what alternatives to the feature you have considered

We will close this issue or ask you to create a pull-request if it's something the maintainers are not actively planning to work on.
~~~

@jivanpal I saw a description and motivation, but I didn't see a discussion of how it would be relevant for at least 90% of Homebrew users or a discussion of alternatives.

Would a cask DSL for sudo_required or even input_required allow this to work?

@ilovezfs The situations where sudo is required are predictable enough (pkg stanza, installer stanza with sudo: true, …) that it’s likely we could guess when it will be needed by parsing casks as they are.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VagelisD picture VagelisD  Â·  3Comments

JustinTArthur picture JustinTArthur  Â·  3Comments

javian picture javian  Â·  4Comments

mislav picture mislav  Â·  3Comments

hktalent picture hktalent  Â·  4Comments