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