Skip to content

Commit

Permalink
206-doublestar-mount Improved Mount list appending other list (non-fo…
Browse files Browse the repository at this point in the history
…r loop)
  • Loading branch information
bdebyl committed Jul 18, 2022
1 parent 0b6773b commit f5790a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,12 @@ func (p *Plugin) Exec() error { // nolint: funlen,cyclop
p.Config.Mount[i] = p.Config.Mount[mountLen-1]
p.Config.Mount = p.Config.Mount[:mountLen-1]

mountGlob, err := doublestar.Glob(mount)
globMounts, err := doublestar.Glob(mount)
if err != nil {
return fmt.Errorf("glob mount error <%s>, %w", mount, err)
}

for _, match := range mountGlob {
p.Config.Mount = append(p.Config.Mount, match)
}
p.Config.Mount = append(p.Config.Mount, globMounts...)
}
}

Expand Down

0 comments on commit f5790a1

Please sign in to comment.