Skip to content

Commit

Permalink
rename lakefs init to setup and keep init as alias (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder authored Nov 25, 2020
1 parent 4c888fa commit 28e4052
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cmd/lakefs/cmd/init.go → cmd/lakefs/cmd/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
"github.com/treeverse/lakefs/stats"
)

// initCmd represents the init command
var initCmd = &cobra.Command{
Use: "init",
Short: "Initialize a LakeFS instance, and setup an admin credentials",
// setupCmd initial lakeFS system setup - build database, load initial data and create first superuser
var setupCmd = &cobra.Command{
Use: "setup",
Aliases: []string{"init"},
Short: "Setup a new LakeFS instance with initial credentials",
Run: func(cmd *cobra.Command, args []string) {
ctx := context.Background()

Expand Down Expand Up @@ -79,8 +80,8 @@ const internalErrorCode = 2

//nolint:gochecknoinits
func init() {
rootCmd.AddCommand(initCmd)
f := initCmd.Flags()
rootCmd.AddCommand(setupCmd)
f := setupCmd.Flags()
f.String("user-name", "", "an identifier for the user (e.g. \"jane.doe\")")
f.String("access-key-id", "", "AWS-format access key ID to create for that user (for integration)")
f.String("secret-access-key", "", "AWS-format secret access key to create for that user (for integration)")
Expand All @@ -94,5 +95,5 @@ func init() {
fmt.Fprint(os.Stderr, err)
os.Exit(internalErrorCode)
}
_ = initCmd.MarkFlagRequired("user-name")
_ = setupCmd.MarkFlagRequired("user-name")
}

0 comments on commit 28e4052

Please sign in to comment.