Skip to content

Commit

Permalink
Make login and logout command hidden aliases.
Browse files Browse the repository at this point in the history
  • Loading branch information
iheanyi committed Apr 1, 2021
1 parent aebc9f2 commit be65061
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,14 @@ func Execute(ver, commit, buildDate string) error {
// We don't want to show the default value
rootCmd.PersistentFlags().Lookup("api-token").DefValue = ""

loginCmd := auth.LoginCmd(cfg)
loginCmd.Hidden = true
logoutCmd := auth.LogoutCmd(cfg)
logoutCmd.Hidden = true

rootCmd.AddCommand(loginCmd)
rootCmd.AddCommand(logoutCmd)
rootCmd.AddCommand(auth.AuthCmd(cfg))
rootCmd.AddCommand(auth.LoginCmd(cfg))
rootCmd.AddCommand(auth.LogoutCmd(cfg))
rootCmd.AddCommand(backup.BackupCmd(cfg))
rootCmd.AddCommand(branch.BranchCmd(cfg))
rootCmd.AddCommand(connect.ConnectCmd(cfg))
Expand Down

0 comments on commit be65061

Please sign in to comment.