File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ func getFeatures(flavour string) []lib.Feature {
7777 funk .FilterString (
7878 featuresGlob ,
7979 func (value string ) bool {
80- if correctPathRegexp .Match ([]byte (value )) {
80+ if correctPathRegexp .Match ([]byte (filepath . Base ( value ) )) {
8181 if yamlFile , err := os .ReadFile (filepath .Join (value , "feature.yaml" )); err != nil {
8282 return false
8383 } else {
@@ -225,8 +225,10 @@ func main() {
225225 os .Exit (1 )
226226 }
227227
228+ features := getFeatures (* flavour )
229+
228230 for _ , includeFeature := range * includeFeatures {
229- if ! funk .Contains (getFeatures ( * flavour ) , func (feature lib.Feature ) bool {
231+ if ! funk .Contains (features , func (feature lib.Feature ) bool {
230232 return feature .Name == includeFeature
231233 }) {
232234 logrus .Errorf ("%s is not a known feature" , includeFeature )
@@ -236,7 +238,7 @@ func main() {
236238 }
237239
238240 for _ , excludeFeature := range * excludeFeatures {
239- if ! funk .Contains (getFeatures ( * flavour ) , func (feature lib.Feature ) bool {
241+ if ! funk .Contains (features , func (feature lib.Feature ) bool {
240242 return feature .Name == excludeFeature
241243 }) {
242244 logrus .Errorf ("%s is not a known feature" , excludeFeature )
You can’t perform that action at this time.
0 commit comments