Skip to content

Commit

Permalink
[FIX] docs generated for commands telegraphing user home where the he…
Browse files Browse the repository at this point in the history
…lp was generated

Signed-off-by: Alberto Ricart <alberto@synadia.com>
  • Loading branch information
aricart committed Jan 8, 2025
1 parent 1760f0b commit 9a21742
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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(&params.Dir, "dir", "d", sr, "directory where the operator directory will be created")
cmd.Flags().StringVarP(&params.Name, "name", "n", "", "name used for the operator, account and user")
cmd.Flags().StringVarP(&params.AccountServerURL, "url", "u", "", "operator account server url")
Expand Down

0 comments on commit 9a21742

Please sign in to comment.