-
Notifications
You must be signed in to change notification settings - Fork 330
Fix the -set-default flag for context create
.
#3044
Conversation
THe flag was unused before this point. This also sets the default state to "true", which is what I think most users would expect. ``` $ waypoint context list | NAME | PLATFORM | SERVER ADDRESS ----+----------------------+------------+---------------------------------------------------------------------------------------- * | is-default | n/a | izaak ~ $ ~/dev/waypoint/waypoint context create -set-default=false not-default Context "not-default" created. $ waypoint context list | NAME | PLATFORM | SERVER ADDRESS ----+----------------------+------------+---------------------------------------------------------------------------------------- * | is-default | n/a | | not-default | n/a | ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update the documentation as well https://github.com/hashicorp/waypoint/blob/7d04fc110757f4808f5bb5394804eeba5639175f/website/content/commands/context-create.mdx
Name: "set-default", | ||
Target: &c.flagSetDefault, | ||
Default: true, | ||
Usage: "Set this context as the new default for the CLI. Defaults to true.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW we don't need the Defaults to true
in the doc string since the CLI adds this automatically:
brian@localghost:waypoint λ waypoint context create -help
Command Options:
...
...
-set-default
Set this context as the new default for the CLI. Defaults to true. The
default is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make a PR to fix this real quick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ha, I was fixing the website docs. Looks like the CLI prints the default, but the website docs don't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noooo! I see, that's weird. 🤔 Maybe we need to update our docs gen then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that the cli help text is more important than the website docs, so I support reverting this for now.
The flag was unused before this point. This also sets the default state to "true", which is what I think most users would expect.
How to verify