mirror of
https://github.com/rclone/rclone
synced 2024-12-24 15:43:45 +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
5ac8cfee56
commit
00e853144e
@ -156,6 +156,15 @@ func ParseOptions(options []string) (opt map[string]string) {
|
||||
func setAlternateFlag(flagName string, output *string) {
|
||||
if rcFlag := pflag.Lookup(flagName); rcFlag != nil && rcFlag.Changed {
|
||||
*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