Merge branch 'main' into pr/unascribed/258

This commit is contained in:
comp500
2024-08-28 18:53:47 +01:00
13 changed files with 95 additions and 25 deletions

View File

@@ -222,6 +222,10 @@ func init() {
func initReadValue(prompt string, def string) string {
fmt.Print(prompt)
if viper.GetBool("non-interactive") {
fmt.Printf("%s\n", def)
return def
}
value, err := bufio.NewReader(os.Stdin).ReadString('\n')
if err != nil {
fmt.Printf("Error reading input: %s\n", err)