Skip to content

Commit d916a7a

Browse files
authored
fix(functions): prevent redundant bind mounts on windows (#4291)
2 parents d083391 + 1dae3f1 commit d916a7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/functions/deploy/bundle.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ func GetBindMounts(cwd, hostFuncDir, hostOutputDir, hostEntrypointPath, hostImpo
130130
// Remove any duplicate mount points
131131
for _, mod := range modules {
132132
hostPath := strings.Split(mod, ":")[0]
133+
if volName := filepath.VolumeName(mod); len(volName) > 0 {
134+
hostPath = volName + strings.Split(strings.TrimPrefix(mod, volName), ":")[0]
135+
}
133136
if !strings.HasPrefix(hostPath, hostFuncDir) &&
134137
(len(hostOutputDir) == 0 || !strings.HasPrefix(hostPath, hostOutputDir)) {
135138
binds = append(binds, mod)

0 commit comments

Comments
 (0)