Skip to content

Commit 1a65852

Browse files
KnifMeltiCopilot
andauthored
Update Sources/Winget-AutoUpdate/Winget-Install.ps1
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent bda50f4 commit 1a65852

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Winget-AutoUpdate/Winget-Install.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ function Install-App ($AppID, $AppArgs) {
167167
elseif ($ModsArguments) {
168168
Write-ToLog "-> Arguments (winget-level): $ModsArguments" # Winget parameters with -h
169169
$argArray = ConvertTo-WingetArgumentArray $ModsArguments
170-
$WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", "winget") + $argArray + @("-h") + @($AppArgs -split " ")
170+
$WingetArgs = @("install", "--id", $AppID, "-e", "--accept-package-agreements", "--accept-source-agreements", "-s", "winget") + $argArray + @("-h")
171+
if (-not [string]::IsNullOrWhiteSpace($AppArgs)) {
172+
$WingetArgs += @($AppArgs -split " ")
173+
}
171174
}
172175
else {
173176
$WingetArgs = "install --id $AppID -e --accept-package-agreements --accept-source-agreements -s winget -h $AppArgs" -split " "

0 commit comments

Comments
 (0)