mirror of
https://github.com/packwiz/packwiz.git
synced 2025-04-19 13:06:30 +02:00
Respect -y
for packwiz init
(#290)
This commit is contained in:
parent
7545d9a777
commit
069d32c5de
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user