Skip to content

Commit 917a51b

Browse files
committed
fix(cli): GET store container by integer ID.
1 parent 82d9290 commit 917a51b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/containers.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ var containersGetCmd = &cobra.Command{
3434
Long: `Get certificate store container by ID or name.`,
3535
Run: func(cmd *cobra.Command, args []string) {
3636
log.SetOutput(ioutil.Discard)
37-
client := cmd.Flag("client").Value.String()
37+
id := cmd.Flag("id").Value.String()
3838
kfClient, _ := initClient()
39-
agents, aErr := kfClient.GetStoreContainer(client)
39+
agents, aErr := kfClient.GetStoreContainer(id)
4040
if aErr != nil {
41-
fmt.Printf("Error, unable to get orchestrator %s. %s\n", client, aErr)
41+
fmt.Printf("Error, unable to get container %s. %s\n", id, aErr)
4242
log.Fatalf("Error: %s", aErr)
4343
}
4444
output, jErr := json.Marshal(agents)
@@ -96,6 +96,7 @@ func init() {
9696
// GET containers command
9797
containersCmd.AddCommand(containersGetCmd)
9898
containersGetCmd.Flags().StringP("id", "i", "", "ID or name of the cert store container.")
99+
containersGetCmd.MarkFlagRequired("id")
99100
// CREATE containers command
100101
//containersCmd.AddCommand(containersCreateCmd)
101102
// UPDATE containers command

0 commit comments

Comments
 (0)