Skip to content

redundant bind mounts for edge_runtime container on windows #4290

@singh-inder

Description

@singh-inder

Describe the bug
I was going through the start command implementation and noticed this block. On Windows, paths are split on the colon after the drive letter (e.g. D:), resulting in hostPath := "D". Because of this, the subsequent if check passes incorrectly, and function files on the host are mounted individually in addition to the functions directory.

for _, mod := range modules {
hostPath := strings.Split(mod, ":")[0]
if !strings.HasPrefix(hostPath, hostFuncDir) &&
(len(hostOutputDir) == 0 || !strings.HasPrefix(hostPath, hostOutputDir)) {
binds = append(binds, mod)
}
}

To Reproduce
Steps to reproduce the behavior:

  1. Create a new function supabase functions new hello
  2. Run supabase start
  3. Run docker inspect --format='{{json .Mounts}}' supabase_edge_runtime_<PROJECT_ID>

Expected behavior
Behavior consistent with linux

Screenshots

  • source code logs (Windows):

    Image
  • source code logs (Linux):

    Image

System information

  • Version of OS: windows 10
  • Version of CLI: 2.48.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions