Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] docs generated for commands telegraphing user home where the help was generated #698

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading