Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
pr-feedback: Adjust default context on server install
Browse files Browse the repository at this point in the history
  • Loading branch information
briancain committed Jun 28, 2022
1 parent cd20a93 commit 1f3b701
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions internal/cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ func (c *InstallCommand) Run(args []string) int {
callOpts = append(callOpts, grpc.PerRPCCredentials(
serverclient.StaticToken(contextConfig.Server.AuthToken)))

// This is our default, so let's actually set the timestamp.
if c.contextName == "install-timestamp" || c.contextName == "" {
// This is our default, so let's actually set the timestamp if not set on the CLI
if c.contextName == "" {
c.contextName = fmt.Sprintf("install-%d", time.Now().Unix())
}

Expand Down Expand Up @@ -362,11 +362,11 @@ func (c *InstallCommand) Flags() *flag.Sets {
})

f.StringVar(&flag.StringVar{
Name: "context-create",
Target: &c.contextName,
Default: "install-timestamp",
Name: "context-create",
Target: &c.contextName,
Usage: "Create a context with connection information for this installation. " +
"The default value will be suffixed with a timestamp at the time the command is executed.",
"The default value if not set will be 'install-' and then be suffixed with a " +
"timestamp at the time the command is executed.",
})

f.BoolVar(&flag.BoolVar{
Expand Down
2 changes: 1 addition & 1 deletion website/content/commands/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ and disable the UI, the command would be:
#### Command Options

- `-accept-tos` - Pass to accept the Terms of Service and Privacy Policy to use the Waypoint URL Service. This is required if the URL service is enabled and you're using the HashiCorp-provided URL service rather than self-hosting. See the privacy policy at https://hashicorp.com/privacy and the ToS at https://waypointproject.io/terms. The default is false.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value will be suffixed with a timestamp at the time the command is executed. The default is install-timestamp.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value if not set will be 'install-' and then be suffixed with a timestamp at the time the command is executed.
- `-context-set-default` - Set the newly installed server as the default CLI context. The default is true.
- `-platform=<string>` - Platform to install the Waypoint server into.

Expand Down
2 changes: 1 addition & 1 deletion website/content/commands/server-install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ and disable the UI, the command would be:
#### Command Options

- `-accept-tos` - Pass to accept the Terms of Service and Privacy Policy to use the Waypoint URL Service. This is required if the URL service is enabled and you're using the HashiCorp-provided URL service rather than self-hosting. See the privacy policy at https://hashicorp.com/privacy and the ToS at https://waypointproject.io/terms. The default is false.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value will be suffixed with a timestamp at the time the command is executed. The default is install-timestamp.
- `-context-create=<string>` - Create a context with connection information for this installation. The default value if not set will be 'install-' and then be suffixed with a timestamp at the time the command is executed.
- `-context-set-default` - Set the newly installed server as the default CLI context. The default is true.
- `-platform=<string>` - Platform to install the Waypoint server into.

Expand Down

0 comments on commit 1f3b701

Please sign in to comment.