refactor(install): improve resource cleanup and remove unused funcs

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
This commit is contained in:
Rodney Osodo
2026-03-09 11:17:36 +03:00
parent 91b7ceb2cf
commit 27d20eb1bc
3 changed files with 26 additions and 68 deletions

View File

@@ -85,33 +85,6 @@ func readString(prompt string, defaultValue string) string {
return value
}
func readStringNoDefault(prompt string) string {
var value string
for {
input := huh.NewInput().
Title(prompt).
Value(&value).
Validate(func(s string) error {
if s == "" {
return fmt.Errorf("this field is required")
}
return nil
})
err := runField(input)
handleAbort(err)
if value != "" {
// Print the answer so it remains visible in terminal history
if !isAccessibleMode() {
fmt.Printf("%s: %s\n", prompt, value)
}
return value
}
}
}
func readPassword(prompt string) string {
var value string