Skip to content

Commit ddcf064

Browse files
authored
CLOUDP-124591: Telemetry - Track Prompt Confirm Choice (#1279)
1 parent e62755d commit ddcf064

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

internal/telemetry/tracker.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,11 @@ func (t *tracker) trackSurvey(p survey.Prompt, response interface{}, e error) er
211211

212212
switch v := p.(type) {
213213
case *survey.Confirm:
214-
options = append(options, withPrompt(v.Message, "confirm"), withDefault(castBool(response) == v.Default))
214+
choice := "false"
215+
if castBool(response) {
216+
choice = "true"
217+
}
218+
options = append(options, withPrompt(v.Message, "confirm"), withDefault(castBool(response) == v.Default), withChoice(choice))
215219
case *survey.Input:
216220
options = append(options, withPrompt(v.Message, "input"), withDefault(castString(response) == v.Default), withEmpty(castString(response) == ""))
217221
case *survey.Password:

0 commit comments

Comments
 (0)