common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1.1k stars 98 forks source link

Add disableusagetips setting and update mechanism #394

Closed JoshuaWilkes closed 1 year ago

JoshuaWilkes commented 1 year ago

Describe your changes

Type of change

Issue and Documentation

-

Testing

Please describe how the reviewer can test the changes. Also include steps to reproduce the testing environment.

  1. make cli

  2. try running dgranted settings set -s DisableUsageTips -vb followed by assume do not supply a profile name, expect not to see a usage tip.

  3. try running dgranted settings set -s DisableUsageTips -vb false followed by assume do not supply a profile name, expect to see the prompt with the tip on usage.

  4. run dgranted settings set and see that you can update other settings

    Checklist before requesting a review

chrnorm commented 1 year ago

Because we're parsing a string from the CLI, I have simplified the --value-bool, --value-str and --value-int into a single flag --value. This will help avoid a problem where a user accidentally gives the wrong flag for a particular config value