mirror of
https://github.com/mudler/luet.git
synced 2025-09-20 02:31:41 +00:00
cmd/tree/pkglist: Fix init of regExcludes
This commit is contained in:
@@ -74,12 +74,12 @@ func NewTreePkglistCommand() *cobra.Command {
|
|||||||
|
|
||||||
regExcludes := make([]*regexp.Regexp, len(excludes))
|
regExcludes := make([]*regexp.Regexp, len(excludes))
|
||||||
if len(excludes) > 0 {
|
if len(excludes) > 0 {
|
||||||
for _, excreg := range excludes {
|
for idx, excreg := range excludes {
|
||||||
re := regexp.MustCompile(excreg)
|
re := regexp.MustCompile(excreg)
|
||||||
if re == nil {
|
if re == nil {
|
||||||
Fatal("Invalid regex " + excreg + "!")
|
Fatal("Invalid regex " + excreg + "!")
|
||||||
}
|
}
|
||||||
regExcludes = append(regExcludes, re)
|
regExcludes[idx] = re
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user