mirror of
https://github.com/rclone/rclone.git
synced 2025-06-23 05:21:50 +02:00
config: Make sure Required values are entered
This commit is contained in:
parent
9bdf465c10
commit
d046402d80
@ -813,6 +813,10 @@ func ChooseOption(o *fs.Option, name string) string {
|
|||||||
in = ReadLine()
|
in = ReadLine()
|
||||||
}
|
}
|
||||||
if in == "" {
|
if in == "" {
|
||||||
|
if o.Required && fmt.Sprint(o.Default) == "" {
|
||||||
|
fmt.Printf("This value is required and it has no default.\n")
|
||||||
|
continue
|
||||||
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
newIn, err := configstruct.StringToInterface(o.Default, in)
|
newIn, err := configstruct.StringToInterface(o.Default, in)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user