ReviewOS

also looking at this

pantry-pm/pantry

fix: preserve sources when removing linked workspace directories

#247
Merged chris wants to merge codex/preserve-linked-workspace-sources into main
4 files +98 -46
.github/workflows/ci.ymlmodified+7-1
Changes to .github/workflows/ci.yml
@@ -153,7 +153,10 @@ jobs:
153153 run: bun .github/scripts/linux-native-tools.ts
154154
155155 - name: Cross-compile the source CLI for native Windows qualification
156 run: cd packages/zig && zig build -Dtarget=x86_64-windows-gnu -Doptimize=Debug -j2 --prefix ../../artifacts/windows-source-cli
156 run: |
157 cd packages/zig
158 zig build -Dtarget=x86_64-windows-gnu -Doptimize=Debug -j2 --prefix ../../artifacts/windows-source-cli
159 zig test src/io_helper.zig -lc -target x86_64-windows-gnu --test-no-exec --test-filter deleteTree -femit-bin=../../artifacts/windows-source-cli/bin/file-tree-tests.exe
157160
158161 - name: Retain the source Windows CLI and Action
159162 uses: actions/upload-artifact@v4
@@ -161,6 +164,7 @@ jobs:
161164 name: windows-source-runtime
162165 path: |
163166 artifacts/windows-source-cli/bin/pantry.exe
167 artifacts/windows-source-cli/bin/file-tree-tests.exe
164168 packages/action/dist/index.js
165169 packages/action/dist/post.js
166170 if-no-files-found: error
@@ -482,6 +486,8 @@ jobs:
482486 with:
483487 name: windows-source-runtime
484488 path: artifacts/windows-source-runtime
489 - name: Test source preservation through directory and nested links
490 run: '& ./artifacts/windows-source-runtime/artifacts/windows-source-cli/bin/file-tree-tests.exe'
485491 - name: Verify the actual source installer and required workspace failures
486492 env:
487493 PANTRY_TEST_CLI: artifacts/windows-source-runtime/artifacts/windows-source-cli/bin/pantry.exe