Skip to content

Commit

Permalink
Allow the feature to be a relative path (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison authored Oct 26, 2023
1 parent bad3e30 commit 7fb593e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/run_feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io/fs"
"path/filepath"
"strings"

"github.com/temporalio/features/harness/go/cmd"
"golang.org/x/mod/semver"
Expand Down Expand Up @@ -39,6 +40,7 @@ func (r *Runner) GlobFeatures(patterns []string) ([]*RunFeature, error) {
if len(patterns) > 0 {
foundMatch := false
for _, pattern := range patterns {
pattern = strings.TrimPrefix(pattern, "features/")
match, err := filepath.Match(pattern, dir)
if !match && err == nil {
match, err = filepath.Match(pattern, dir+"/feature."+r.config.Lang)
Expand Down

0 comments on commit 7fb593e

Please sign in to comment.