mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-23 09:54:25 +08:00
ci: handle empty plonds baselines safely
This commit is contained in:
@@ -363,9 +363,11 @@ foreach ($config in $supportedPlatforms) {
|
|||||||
"0.0.0"
|
"0.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
$baselineHasContent = Get-ChildItem -LiteralPath $baselineCurrentDir -Force -ErrorAction SilentlyContinue | Select-Object -First 1
|
$baselineItems = @(Get-ChildItem -LiteralPath $baselineCurrentDir -Force -ErrorAction SilentlyContinue)
|
||||||
if ($baselineHasContent) {
|
if ($baselineItems.Count -gt 0) {
|
||||||
Copy-Item -LiteralPath (Join-Path $baselineCurrentDir '*') -Destination $snapshotRoot -Recurse -Force
|
foreach ($baselineItem in $baselineItems) {
|
||||||
|
Copy-Item -LiteralPath $baselineItem.FullName -Destination $snapshotRoot -Recurse -Force
|
||||||
|
}
|
||||||
$snapshotDir = $snapshotRoot
|
$snapshotDir = $snapshotRoot
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user