Skip to content

Commit 8697d75

Browse files
authored
Fix: List of Runtimes not Displaying (#24)
Fixed runtime list display
1 parent d9bfa30 commit 8697d75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/pipelines.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ var pipelinesCmd = &cobra.Command{
5757

5858
if len(runtimes) != 0 {
5959
var selection int
60+
for index, runtime := range runtimes {
61+
cmd.Printf("%d. %s\n", index+1, runtime["metadata"].(map[string]interface{})["name"])
62+
}
6063
for {
61-
cmd.Println("Please select the runtime to gather data from (Number):")
64+
cmd.Print("\nPlease select the runtime to gather data from (Number): ")
6265
_, err := fmt.Scanf("%d", &selection)
6366
if err != nil || selection < 1 || selection > len(runtimes) {
64-
cmd.Println("Invalid selection. Please enter a number corresponding to one of the listed runtimes.")
67+
cmd.PrintErrln("Invalid selection. Please enter a number corresponding to one of the listed runtimes.")
6568
continue
6669
}
6770
break

0 commit comments

Comments
 (0)