Repository navigation
Fix duplicate mount when YOLO_PODMAN_VOLUMES contains workspace or claude dir - #84
Open
yarikoptic-gitmate wants to merge 1 commit into
Open
yarikoptic-gitmate wants to merge 1 commit into
yarikoptic-gitmate wants to merge 1 commit into
Conversation
…pace or claude dir When a user's config (user-wide or per-project) lists a directory that matches the current working directory or ~/.claude, podman rejects the run with "duplicate mount destination". This happened in practice when running yolo from a directory that was also listed in YOLO_PODMAN_VOLUMES (e.g. ~/proj/CON/skills in the user config while invoking yolo from that directory). Defer adding config volumes to PODMAN_ARGS until after WORKSPACE_DIR and CLAUDE_DIR are known, then skip any volume whose container destination matches either of those two mounts, emitting a warning to stderr. Co-Authored-By: Claude Code 2.1.275 / Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a directory listed in
YOLO_PODMAN_VOLUMES(user-wide or per-project config) happens to be the current working directory or~/.claude, podman rejects the run with:This is because the workspace and claude mounts are added unconditionally by the script, and the config volumes were added earlier — before the final mount destinations were known — so there was no opportunity to deduplicate.
Fix: collect config volumes into
_CONFIG_VOLSfirst, then afterWORKSPACE_DIRandCLAUDE_DIRare determined, add each volume only if its container destination does not conflict with either of those two mounts. Conflicting entries emit a warning to stderr and are silently skipped (the directory is still mounted via the fixed workspace/claude mount).Test plan
--dangerously-skip-permissions)