Problem
extract_mounts_to_file in install.sh filters default mounts by source prefix:
(startswith("source=claude-code-bashhistory-") | not) and
(startswith("source=claude-code-config-") | not) and
...
This is hardcoded to the claude-code volume prefix. If someone forks this and changes the volume names, or if the naming convention changes, the filter silently stops working and default mounts get preserved/duplicated on template reinstall.
Proposed fix
Filter by target path instead, which is constant regardless of volume naming:
(contains("target=/commandhistory,") | not) and
(contains("target=/home/vscode/.claude,") | not) and
(contains("target=/home/vscode/.config/gh,") | not) and
(contains("target=/home/vscode/.gitconfig,") | not) and
(contains("target=/workspace/.devcontainer,") | not)
Also fix the temp file leak — add rm -f "$temp_file" in the else branch when no custom mounts are found.
Already done in trailofbits/skills devcontainer-setup plugin.
Problem
extract_mounts_to_filein install.sh filters default mounts by source prefix:This is hardcoded to the
claude-codevolume prefix. If someone forks this and changes the volume names, or if the naming convention changes, the filter silently stops working and default mounts get preserved/duplicated on template reinstall.Proposed fix
Filter by target path instead, which is constant regardless of volume naming:
Also fix the temp file leak — add
rm -f "$temp_file"in the else branch when no custom mounts are found.Already done in
trailofbits/skillsdevcontainer-setup plugin.