skillshare
skillshare copied to clipboard
Preserved project links during adopt resync
Summary
- Passed the project root through the shared adopt apply path before re-syncing targets.
- Kept project-mode
symlinkandmergetarget re-sync on the existing relative-link behavior instead of falling back to absolute links. - Updated the project adopt integration assertion to resolve symlink targets across macOS
/private/varcanonicalization and to catch absolute project links on non-Windows platforms.
Context
Follow-up to #181. The failing macOS integration job showed TestAdoptProject_MigratesAndResyncs comparing a canonical /private/var/... symlink target against the logical temp path. While checking that, I found the re-sync path was passing an empty project root, so project-mode adopt created absolute links instead of the portable relative links used by normal project sync.
Tests
go build -o bin/skillshare ./cmd/skillshareSKILLSHARE_TEST_BINARY=$PWD/bin/skillshare go test -v -race ./tests/integration -run '^TestAdoptProject_MigratesAndResyncs$' -count=1go test ./internal/adopt ./cmd/skillshare -run 'TestApply_ReSyncHonorsCopyMode|TestAdopt' -count=1make test-unit
Addressed the EvalSymlinks error handling review note in 0baecf2. Re-ran the targeted macOS-relevant integration test locally:
SKILLSHARE_TEST_BINARY=$PWD/bin/skillshare go test -v -race ./tests/integration -run '^TestAdoptProject_MigratesAndResyncs$' -count=1