diff --git a/cmd/list.go b/cmd/list.go index 4e52665..8decec7 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -6,6 +6,7 @@ import ( "sort" "text/tabwriter" + "github.com/adikari/safebox/v2/config" "github.com/adikari/safebox/v2/store" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -58,14 +59,14 @@ func list(_ *cobra.Command, _ []string) error { sort.Sort(ByName(configs)) } - printList(configs) + printList(configs, config) return nil } -func printList(configs []store.Config) { +func printList(configs []store.Config, cfg *config.Config) { if len(configs) <= 0 { - fmt.Print("no configurations to list") + fmt.Printf("no configurations to list. stage = %s, service = %s, region = %s\n", cfg.Stage, cfg.Service, *cfg.Session.Config.Region) return } @@ -87,8 +88,7 @@ func printList(configs []store.Config) { } fmt.Fprintln(w, "---") - fmt.Fprintf(w, "Total parameters = %d", len(configs)) - fmt.Fprintln(w, "") + fmt.Fprintf(w, "Total parameters = %d, stage = %s, service = %s, region = %s\n", len(configs), cfg.Stage, cfg.Service, *cfg.Session.Config.Region) w.Flush() } diff --git a/npm/package.json b/npm/package.json index ec8d9f9..bd02f84 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "@adikari/safebox", - "version": "1.3.4", + "version": "1.3.5", "description": "A Fast and Flexible secret manager built with love by adikari in Go", "main": "index.js", "bin": "./run.js",