Skip to content

Commit 6a5c199

Browse files
authored
Merge branch 'main' into feat/nushell-support
2 parents f7b6740 + fe5789e commit 6a5c199

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

justfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,30 @@ _clean_dist:
1616
_clean_dist:
1717
Remove-Item -Path 'packages/*/dist' -Recurse -Force -ErrorAction SilentlyContinue
1818

19-
init: _clean_dist
19+
init: _clean_dist _fix_symlinks
2020
cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear dprint taplo-cli -y
2121
node packages/tools/src/index.ts sync-remote
2222
pnpm install
2323
pnpm -C docs install
2424

25+
[unix]
26+
_fix_symlinks:
27+
#!/usr/bin/env bash
28+
if [ "$(git config --get core.symlinks)" != "true" ]; then \
29+
echo "Enabling core.symlinks and re-checking out symlinks..."; \
30+
git config core.symlinks true; \
31+
git ls-files -s | grep '^120000' | cut -f2 | while read -r f; do git checkout -- "$f"; done; \
32+
fi
33+
34+
[windows]
35+
_fix_symlinks:
36+
$symlinks = git config --get core.symlinks; \
37+
if ($symlinks -ne 'true') { \
38+
Write-Host 'Enabling core.symlinks and re-checking out symlinks...'; \
39+
git config core.symlinks true; \
40+
git ls-files -s | Where-Object { $_ -match '^120000' } | ForEach-Object { ($_ -split "`t", 2)[1] } | ForEach-Object { git checkout -- $_ }; \
41+
}
42+
2543
build:
2644
pnpm install
2745
pnpm --filter @rolldown/pluginutils build

0 commit comments

Comments
 (0)