Skip to content

Commit

Permalink
Ignore unexpected file modes (bazelbuild#549)
Browse files Browse the repository at this point in the history
Ignore unexpected file modes

On the Mac, git fsmonitor uses a domain socket in the .git/ folder to keep track of the fsmonitor process. cas chokes on that (see https://crbug.com/40270112).

Therefore, ignore domain sockets.
  • Loading branch information
avidrissman committed Apr 9, 2024
1 parent d797fb1 commit c1bc825
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion go/pkg/cas/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,10 @@ func (u *uploader) visitPath(ctx context.Context, absPath string, info os.FileIn
node, err := u.visitRegularFile(ctx, absPath, info)
return &digested{dirEntry: node, digest: node.GetDigest()}, err

// Ignore all non-expected modes (e.g. domain sockets as used by git
// fsmonitor).
default:
return nil, fmt.Errorf("unexpected file mode %s", info.Mode())
return nil, nil
}
})
if err != nil {
Expand Down

0 comments on commit c1bc825

Please sign in to comment.