From fbf21b5f2d3d94d1068b7de350b7ad06bd49593d Mon Sep 17 00:00:00 2001 From: voutasaurus Date: Thu, 22 Oct 2015 00:48:46 -0700 Subject: [PATCH] Modifies documentation in output of vault server -dev Environment variable setting is different in windows --- command/server.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/command/server.go b/command/server.go index df1180dd01..4c8ba808f4 100644 --- a/command/server.go +++ b/command/server.go @@ -12,6 +12,7 @@ import ( "strconv" "strings" "time" + "runtime" "github.com/armon/go-metrics" "github.com/hashicorp/logutils" @@ -149,6 +150,13 @@ func (c *ServerCommand) Run(args []string) int { return 1 } + export := "export" + quote := "'" + if runtime.GOOS == "windows" { + export = "set" + quote = "" + } + c.Ui.Output(fmt.Sprintf( "==> WARNING: Dev mode is enabled!\n\n"+ "In this mode, Vault is completely in-memory and unsealed.\n"+ @@ -157,7 +165,7 @@ func (c *ServerCommand) Run(args []string) int { "immediately begin using the Vault CLI.\n\n"+ "The only step you need to take is to set the following\n"+ "environment variables:\n\n"+ - " export VAULT_ADDR='http://127.0.0.1:8200'\n\n"+ + " "+export+" VAULT_ADDR="+quote+"http://127.0.0.1:8200"+quote+"\n\n"+ "The unseal key and root token are reproduced below in case you\n"+ "want to seal/unseal the Vault or play with authentication.\n\n"+ "Unseal Key: %s\nRoot Token: %s\n",