Skip to content

Commit

Permalink
fix find bug
Browse files Browse the repository at this point in the history
  • Loading branch information
keisku committed Aug 27, 2021
1 parent 9c16f9b commit b7dfe4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions find.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func secretCommands(ctx context.Context, name string, opt options) ([]*exec.Cmd,
if name != "" {
return []*exec.Cmd{kubectlGetSecret(ctx, append([]string{name, "-n", opt.Namespace}, o...)...)}, nil
}
var ns []string
ns := []string{opt.Namespace}
if opt.AllNamespaces {
namespaecs, err := getAllNamespaces(ctx)
if err != nil {
Expand All @@ -110,8 +110,9 @@ func secretCommands(ctx context.Context, name string, opt options) ([]*exec.Cmd,
for _, n := range namespaecs {
ns = append(ns, n.Name)
}
} else {
ns = strings.Split(opt.MultiNamespaces, ",")
}
if len(opt.MultiNamespaces) != 0 {
ns = append(ns, strings.Split(opt.MultiNamespaces, ",")...)
}
cmds := make([]*exec.Cmd, len(ns))
for i, n := range ns {
Expand Down

0 comments on commit b7dfe4e

Please sign in to comment.