Skip to content

Support directory symlinks during profile install#91

Closed
jantunes-te wants to merge 1 commit into
bartolli:mainfrom
jantunes-te:fix/profile-dir-symlink-install
Closed

Support directory symlinks during profile install#91
jantunes-te wants to merge 1 commit into
bartolli:mainfrom
jantunes-te:fix/profile-dir-symlink-install

Conversation

@jantunes-te

Copy link
Copy Markdown

Summary

  • support profile entries that resolve to directories (including symlinked directories)
  • recursively copy directory contents instead of calling std::fs::copy on a directory
  • keep lockfile file tracking accurate for copied directory contents
  • avoid sidecar creation on --force reinstall when directory contents are already owned by the same profile

Repro

  1. Create a profile containing a symlink to a directory (e.g. skills/sample -> ../../skills/sample).
  2. Run codanna profile install <profile>.
  3. Current behavior on main: install fails with:
    • IO error: the source path is neither a regular file nor a symlink to a regular file
  4. Behavior with this PR: install succeeds and copies files under the symlinked directory.

Tests

  • cargo test --test profiles_tests symlinked_directory -- --nocapture
  • cargo test --test profiles_tests test_install_profile_conflict_creates_sidecar -- --nocapture

Allow profile installation to copy symlinked directories recursively
instead of failing through std::fs::copy.

Track copied files under the target directory in the lockfile and
preserve overwrite semantics for owned directory entries during
forced reinstall.

Add regression tests covering initial install and forced reinstall for
symlinked directories.
@jantunes-te

Copy link
Copy Markdown
Author

Closing per request: keeping changes local without PR/commits.

@jantunes-te jantunes-te deleted the fix/profile-dir-symlink-install branch February 25, 2026 18:50
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.

2 participants