From 1f3b70191f4f7ad63265b3dcd22080099295cd57 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Tue, 28 Jun 2022 13:44:58 -0700 Subject: [PATCH] pr-feedback: Adjust default context on server install --- internal/cli/install.go | 12 ++++++------ website/content/commands/install.mdx | 2 +- website/content/commands/server-install.mdx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/cli/install.go b/internal/cli/install.go index 740615a86a7..62de86d11e7 100644 --- a/internal/cli/install.go +++ b/internal/cli/install.go @@ -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()) } @@ -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{ diff --git a/website/content/commands/install.mdx b/website/content/commands/install.mdx index d464b58cdd5..7326db0b8f8 100644 --- a/website/content/commands/install.mdx +++ b/website/content/commands/install.mdx @@ -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=` - 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=` - 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=` - Platform to install the Waypoint server into. diff --git a/website/content/commands/server-install.mdx b/website/content/commands/server-install.mdx index 3be34e7878d..6044e7ccef2 100644 --- a/website/content/commands/server-install.mdx +++ b/website/content/commands/server-install.mdx @@ -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=` - 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=` - 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=` - Platform to install the Waypoint server into.