Skip to content

Commit 7276c1c

Browse files
cmk: don't call sync automatically in CLI mode
This removes the code to unnecessarily call sync command when api-key and secret key is passed in CLI mode. Signed-off-by: Rohit Yadav <[email protected]>
1 parent 8a4a036 commit 7276c1c

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

cmk.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ func main() {
8888
cfg.LoadProfile(*profile)
8989
}
9090
config.LoadCache(cfg)
91-
92-
if *apiKey != "" && *secretKey != "" {
93-
request := cmd.NewRequest(nil, cfg, nil)
94-
syncResponse, err := cmd.NewAPIRequest(request, "listApis", []string{"listall=true"}, false)
95-
if err == nil && len(args) == 0 {
96-
fmt.Printf("Discovered %v APIs\n", cfg.UpdateCache(syncResponse))
97-
}
98-
}
99-
10091
cli.SetConfig(cfg)
10192

10293
config.Debug("cmdline args:", strings.Join(os.Args, ", "))

0 commit comments

Comments
 (0)