You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rootCmd.PersistentFlags().StringVar(&pathPrefix, "path-prefix", "", "Specify a path prefix that is prepended to all paths in the openapi schema. This will strip them when evaluating the resource hierarchy paths.")
49
-
rootCmd.MarkPersistentFlagRequired("host")
50
49
50
+
rootCmd.SetArgs(args)
51
51
iferr:=rootCmd.Execute(); err!=nil {
52
52
returnerr
53
53
}
@@ -58,8 +58,7 @@ func aepcli() error {
58
58
59
59
c, err:=config.ReadConfig()
60
60
iferr!=nil {
61
-
fmt.Println(fmt.Errorf("unable to read config: %v", err))
62
-
os.Exit(1)
61
+
returnfmt.Errorf("unable to read config: %v", err)
63
62
}
64
63
65
64
ifapi, ok:=c.APIs[fileOrAlias]; ok {
@@ -77,26 +76,23 @@ func aepcli() error {
77
76
78
77
openapi, err:=openapi.FetchOpenAPI(fileOrAlias)
79
78
iferr!=nil {
80
-
fmt.Println(err)
81
-
os.Exit(1)
79
+
returnfmt.Errorf("unable to fetch openapi: %w", err)
0 commit comments