diff --git a/internal/modsdir/manifest.go b/internal/modsdir/manifest.go index 36f6c033f8..8372f4384f 100644 --- a/internal/modsdir/manifest.go +++ b/internal/modsdir/manifest.go @@ -115,6 +115,12 @@ func (m Manifest) WriteSnapshot(w io.Writer) error { } else { record.VersionStr = "" } + + // Ensure Dir is written in a format that can be read by Linux and + // Windows nodes + if record.Dir != "" { + record.Dir = filepath.ToSlash(record.Dir) + } write.Records = append(write.Records, record) }