mirror of
https://github.com/rclone/rclone.git
synced 2025-01-03 21:09:18 +01:00
rc: set url to the first value of rc-addr since it has been converted to an array of strings now -- fixes #6641
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
This commit is contained in:
parent
cce4340d48
commit
5a9706ab61
@ -156,6 +156,15 @@ func ParseOptions(options []string) (opt map[string]string) {
|
|||||||
func setAlternateFlag(flagName string, output *string) {
|
func setAlternateFlag(flagName string, output *string) {
|
||||||
if rcFlag := pflag.Lookup(flagName); rcFlag != nil && rcFlag.Changed {
|
if rcFlag := pflag.Lookup(flagName); rcFlag != nil && rcFlag.Changed {
|
||||||
*output = rcFlag.Value.String()
|
*output = rcFlag.Value.String()
|
||||||
|
if sliceValue, ok := rcFlag.Value.(pflag.SliceValue); ok {
|
||||||
|
stringSlice := sliceValue.GetSlice()
|
||||||
|
for _, value := range stringSlice {
|
||||||
|
if value != "" {
|
||||||
|
*output = value
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user