Skip to content

Commit

Permalink
Respect -y for packwiz init
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz authored and LittleChest committed Apr 4, 2024
1 parent 0c757b6 commit 7332e2e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7332e2e

Please sign in to comment.