Fix issues.

This commit is contained in:
Vasyl Palamarchuk
2026-09-05 16:38:22 -07:00
parent 8a2186cfe4
commit 4c5a07e08f
+8 -5
View File
@@ -813,17 +813,20 @@ if (-not $SkipDownloads) {
}
} | Out-Null
foreach ($configuredApp in $Configuration.PortableApps) {
$ConfiguredPortableApps = @($Configuration.PortableApps | ForEach-Object { $_ })
foreach ($configuredApp in $ConfiguredPortableApps) {
$appType = [string]$configuredApp.Type
$isGitHub = $appType -like 'GitHub*'
$isDirectExe = $appType -in @('Exe', 'GitHubExe')
$destination = Join-Path $PortableRoot $configuredApp.Folder
$createShortcut = $null -eq $configuredApp.Shortcut -or [bool]$configuredApp.Shortcut
$flattenSingleDirectory = if ($configuredApp.PSObject.Properties['Flatten']) { [bool]$configuredApp.Flatten } else { -not $isDirectExe }
$downloadWithCurl = [bool]($configuredApp.PSObject.Properties['DownloadWithCurl'] -and $configuredApp.DownloadWithCurl)
if (-not $ForcePortableUpdates -and (Test-PortableInstallation -Destination $destination -ExpectedExecutable $configuredApp.Executable)) {
$PortableDefinitions.Add([pscustomobject]@{
Name=$configuredApp.Name; Type=if ($isDirectExe) { 'Exe' } else { 'Zip' }; Uri=''; Folder=$configuredApp.Folder;
Executable=$configuredApp.Executable; Archive=''; Flatten=[bool]$configuredApp.Flatten; Shortcut=$createShortcut;
DownloadWithCurl=[bool]$configuredApp.DownloadWithCurl
Executable=$configuredApp.Executable; Archive=''; Flatten=$flattenSingleDirectory; Shortcut=$createShortcut;
DownloadWithCurl=$downloadWithCurl
})
Add-Result 'PortableResolve' $configuredApp.Name 'Skipped' "Validated installation already exists: $destination"
Write-Log "$($configuredApp.Name) release lookup skipped because its portable installation is already validated." 'INFO'
@@ -841,8 +844,8 @@ if (-not $SkipDownloads) {
else {
$PortableDefinitions.Add([pscustomobject]@{
Name=$configuredApp.Name; Type=if ($isDirectExe) { 'Exe' } else { 'Zip' }; Uri=$configuredApp.Uri; Folder=$configuredApp.Folder;
Executable=$configuredApp.Executable; Archive=$configuredApp.Archive; Flatten=[bool]$configuredApp.Flatten; Shortcut=$createShortcut;
DownloadWithCurl=[bool]$configuredApp.DownloadWithCurl
Executable=$configuredApp.Executable; Archive=$configuredApp.Archive; Flatten=$flattenSingleDirectory; Shortcut=$createShortcut;
DownloadWithCurl=$downloadWithCurl
})
}
}