mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-08 19:12:22 +00:00
fix(ci): link Windows hydrate node modules
This commit is contained in:
10
.github/workflows/crabbox-hydrate.yml
vendored
10
.github/workflows/crabbox-hydrate.yml
vendored
@@ -431,6 +431,16 @@ jobs:
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
$workspaceNodeModules = Join-Path $workspace "node_modules"
|
||||
if (Test-Path $workspaceNodeModules) {
|
||||
$workspaceNodeModulesItem = Get-Item $workspaceNodeModules -Force
|
||||
if (($workspaceNodeModulesItem.Attributes -band [System.IO.FileAttributes]::ReparsePoint) -eq 0) {
|
||||
throw "workspace node_modules exists and is not a link: $workspaceNodeModules"
|
||||
}
|
||||
} else {
|
||||
New-Item -ItemType Junction -Path $workspaceNodeModules -Target $env:PNPM_CONFIG_MODULES_DIR | Out-Null
|
||||
}
|
||||
|
||||
$corepackShimDir = Join-Path $nodeBin "node_modules\corepack\shims"
|
||||
if (Test-Path $corepackShimDir) {
|
||||
$env:PNPM_HOME = $corepackShimDir
|
||||
|
||||
@@ -178,6 +178,9 @@ describe("package acceptance workflow", () => {
|
||||
);
|
||||
expect(hydrateWindowsPnpm.run).toContain('"--filter",');
|
||||
expect(hydrateWindowsPnpm.run).toContain('"openclaw",');
|
||||
expect(hydrateWindowsPnpm.run).toContain(
|
||||
'New-Item -ItemType Junction -Path $workspaceNodeModules -Target $env:PNPM_CONFIG_MODULES_DIR',
|
||||
);
|
||||
expect(hydrateWindowsPnpm.run).not.toContain("Remove-Item -Recurse -Force");
|
||||
expect(hydrateWindowsPnpm.run).not.toContain("Add-Content -Path $env:GITHUB_ENV");
|
||||
expect(hydrateWindowsPnpm.run).not.toContain("Add-Content -Path $env:GITHUB_PATH");
|
||||
|
||||
Reference in New Issue
Block a user