fix nested conditions
This commit is contained in:
parent
196b222a8b
commit
10fe017765
@ -117,11 +117,10 @@ func (f *StringSliceFlag) GetValue() string {
|
|||||||
// Apply populates the flag given the flag set and environment
|
// Apply populates the flag given the flag set and environment
|
||||||
func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
|
func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
|
||||||
|
|
||||||
if f.Destination != nil {
|
if f.Destination != nil && f.Value != nil {
|
||||||
if f.Value != nil {
|
|
||||||
f.Destination.slice = make([]string, len(f.Value.slice))
|
f.Destination.slice = make([]string, len(f.Value.slice))
|
||||||
copy(f.Destination.slice, f.Value.slice)
|
copy(f.Destination.slice, f.Value.slice)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
|
if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user