Skip to content

Only prompt for --auto-sudo when needed #15

Description

@lgarron

Consider the following:

hosts add --auto-sudo 127.0.0.1 cdn.cubing.net
sudo -k # clear `sudo`
hosts add --auto-sudo 127.0.0.1 cdn.cubing.net

Since adding a host is idempotent, the second invocation doesn't change the /etc/hosts file, and hosts can tell this without asking for sudo. It would be nice if --auto-sudo was a little smarter and avoided the prompt. (In fact, that was sort of my assumption based on the name.)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions