Skip to content

fix(compose): anchor bind-mount sources to --project-directory#65

Merged
us merged 1 commit into
mainfrom
fix/compose-bindmount-project-directory
Jul 4, 2026
Merged

fix(compose): anchor bind-mount sources to --project-directory#65
us merged 1 commit into
mainfrom
fix/compose-bindmount-project-directory

Conversation

@us

@us us commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • ComposeOrchestrator.resolveVolumeMounts resolved relative bind-mount sources (./data, ../shared, data/dir) against the process's current working directory instead of the Compose project directory (--project-directory), even though startService already threads projectDir through for build-context resolution.
  • Added a projectDir: URL parameter to resolveVolumeMounts and anchor relative sources to it, mirroring the existing ImageManager.resolveContextPath(context:cwd:) pattern used for build contexts.
  • ~-prefixed sources are now expanded independently via expandingTildeInPath rather than relying on URL(fileURLWithPath:)'s implicit CWD-relative tilde expansion, keeping their resolution decoupled from the project directory.
  • Absolute paths and named volumes are unaffected.

Closes #60

Test plan

  • swift build
  • swift test --filter ComposeOrchestratorTests (18/18 passed, including 2 new tests proving relative bind-mount sources anchor to a project directory that differs from CWD)
  • swift test (full suite, 304/304 passed)

Copilot AI review requested due to automatic review settings July 4, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@us
us force-pushed the fix/compose-bindmount-project-directory branch from d594887 to 5b07ba5 Compare July 4, 2026 11:20
@us
us merged commit 9df29ad into main Jul 4, 2026
1 check passed
@us
us deleted the fix/compose-bindmount-project-directory branch July 4, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mocker compose bind-mount sources resolve against CWD, not --project-directory

2 participants