mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 09:44:17 +02:00
enhanced default cluster selection, add 'cluster switch', overhaul json header setting (#47)
This commit is contained in:
@@ -122,7 +122,10 @@ func Main() int {
|
||||
|
||||
Before: func(ctx context.Context, cmd *cli.Command) (context.Context, error) {
|
||||
if tree {
|
||||
Tree(cmd)
|
||||
if err := Tree(cmd); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
@@ -254,7 +257,7 @@ func Debug(conf *cfg.Config) *cli.Command {
|
||||
func Tree(cmd *cli.Command) error {
|
||||
max := 20
|
||||
|
||||
cmd.Walk(func(cmd *cli.Command) error {
|
||||
return cmd.Walk(func(cmd *cli.Command) error {
|
||||
path := cmd.Path()
|
||||
command := path[len(path)-1]
|
||||
|
||||
@@ -269,6 +272,4 @@ func Tree(cmd *cli.Command) error {
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user