Abort datasync in pull mode if no dir

This commit is contained in:
Steve Streeting 2023-06-26 11:36:26 +01:00
parent b9e4ae2fb6
commit 0ecdbec381

View File

@ -191,9 +191,16 @@ try {
} }
} }
# Create project sync dir if necessary # Create project sync dir if necessary when pushing
$syncdir = Join-Path $root $uprojname $syncdir = Join-Path $root $uprojname
New-Item -ItemType Directory $syncdir -Force > $null if ($mode -eq "push") {
New-Item -ItemType Directory $syncdir -Force > $null
} elseif (-not (Test-Path $syncdir)) {
# Abort, no need to pull anything
Write-Output "No sync dir at $syncdir, aborting"
Exit 0
}
Write-Output "Sync project folder: $syncdir" Write-Output "Sync project folder: $syncdir"
$umaps = Get-Current-Umaps $umaps = Get-Current-Umaps