From 9a21742a7b49797570f8bdf03107762443a59ec1 Mon Sep 17 00:00:00 2001 From: Alberto Ricart Date: Wed, 8 Jan 2025 12:47:00 -0600 Subject: [PATCH] [FIX] docs generated for commands telegraphing user home where the help was generated Signed-off-by: Alberto Ricart --- cmd/init.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/init.go b/cmd/init.go index 111c6175..0ec0006c 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -1,5 +1,5 @@ /* - * Copyright 2018-2022 The NATS Authors + * Copyright 2018-2025 The NATS Authors * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -54,10 +54,12 @@ func createInitCmd() *cobra.Command { return nil }, } + sr := GetConfig().StoreRoot if sr == "" { - sr = home.NscDataHome(home.StoresSubDirName) + sr = AbbrevHomePaths(home.NscDataHome(home.StoresSubDirName)) } + cmd.Flags().StringVarP(¶ms.Dir, "dir", "d", sr, "directory where the operator directory will be created") cmd.Flags().StringVarP(¶ms.Name, "name", "n", "", "name used for the operator, account and user") cmd.Flags().StringVarP(¶ms.AccountServerURL, "url", "u", "", "operator account server url")