Skip to content

Commit

Permalink
fix: return err in walk (#1667)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
wolfogre and mergify[bot] authored Mar 8, 2023
1 parent 24440d9 commit ac5dd8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/exprparser/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"strings"

"github.com/go-git/go-git/v5/plumbing/format/gitignore"

"github.com/nektos/act/pkg/model"
"github.com/rhysd/actionlint"
)
Expand Down Expand Up @@ -202,6 +203,9 @@ func (impl *interperterImpl) hashFiles(paths ...reflect.Value) (string, error) {

var files []string
if err := filepath.Walk(impl.config.WorkingDir, func(path string, fi fs.FileInfo, err error) error {
if err != nil {
return err
}
sansPrefix := strings.TrimPrefix(path, impl.config.WorkingDir+string(filepath.Separator))
parts := strings.Split(sansPrefix, string(filepath.Separator))
if fi.IsDir() || !matcher.Match(parts, fi.IsDir()) {
Expand Down

0 comments on commit ac5dd8f

Please sign in to comment.