Skip to content

Commit

Permalink
fix(action): skipping .git
Browse files Browse the repository at this point in the history
- we wanted to skip .git directory
- submodules contain .git file
- returning 'filepath.SkipDir' on '.git' file skips the directory
  in which the file is

Signed-off-by: AtomicFS <[email protected]>
  • Loading branch information
AtomicFS committed Dec 5, 2024
1 parent e8a6ad8 commit 0be9af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func AnyFileNewerThan(path string, givenTime time.Time) (bool, error) {
if errors.Is(err, ErrPathIsDirectory) {
errMod := filepath.WalkDir(path, func(path string, info os.DirEntry, _ error) error {
// skip .git
if info.Name() == ".git" {
if info.Name() == ".git" && info.IsDir() {
return filepath.SkipDir
}
if !info.IsDir() {
Expand Down

0 comments on commit 0be9af6

Please sign in to comment.