Fix: replace ?? operator with compatible if/else for older PowerShell
This commit is contained in:
@@ -36,7 +36,8 @@ if (Test-Path $SourcesFile) {
|
||||
$TmpDir = Join-Path $env:TEMP "ag-sync-$($Source.name)"
|
||||
if (Test-Path $TmpDir) { Remove-Item -Recurse -Force $TmpDir }
|
||||
git clone --depth 1 $Source.url $TmpDir 2>$null
|
||||
$SrcPath = Join-Path $TmpDir ($Source.path ?? "skills")
|
||||
$SkillPath = if ($Source.path) { $Source.path } else { "skills" }
|
||||
$SrcPath = Join-Path $TmpDir $SkillPath
|
||||
if (Test-Path $SrcPath) {
|
||||
Get-ChildItem -Path $SrcPath -Directory | ForEach-Object {
|
||||
Copy-Item -Path $_.FullName -Destination (Join-Path $Dest $_.Name) -Recurse -Force
|
||||
|
||||
Reference in New Issue
Block a user