mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 13:17:26 +00:00
Fix null argument issue
This commit is contained in:
parent
427eb4abfa
commit
2ab3c169e9
4 changed files with 24 additions and 12 deletions
9
32
9
32
|
|
@ -91,7 +91,7 @@ function Main {
|
||||||
foreach ($item in $downloads) {
|
foreach ($item in $downloads) {
|
||||||
$outFile = Join-Path $tempDir $item.Name
|
$outFile = Join-Path $tempDir $item.Name
|
||||||
Write-Host "Downloading $($item.Name)..."
|
Write-Host "Downloading $($item.Name)..."
|
||||||
Start-Process -FilePath $aria2Exe -ArgumentList @(
|
$argumentList = @(
|
||||||
"--dir=`"$($outFile | Split-Path)`"",
|
"--dir=`"$($outFile | Split-Path)`"",
|
||||||
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
||||||
"--allow-overwrite=true",
|
"--allow-overwrite=true",
|
||||||
|
|
@ -99,9 +99,12 @@ function Main {
|
||||||
"--max-connection-per-server=8",
|
"--max-connection-per-server=8",
|
||||||
"--split=8",
|
"--split=8",
|
||||||
"--min-split-size=1M",
|
"--min-split-size=1M",
|
||||||
"$regionalWorkaround",
|
|
||||||
"`"$($item.Url)`""
|
"`"$($item.Url)`""
|
||||||
) -NoNewWindow -Wait
|
)
|
||||||
|
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
|
||||||
|
$argumentList += $regionalWorkaround
|
||||||
|
}
|
||||||
|
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Install DirectX ---
|
# --- Install DirectX ---
|
||||||
|
|
|
||||||
9
64
9
64
|
|
@ -102,7 +102,7 @@ function Main {
|
||||||
foreach ($item in $downloads) {
|
foreach ($item in $downloads) {
|
||||||
$outFile = Join-Path $tempDir $item.Name
|
$outFile = Join-Path $tempDir $item.Name
|
||||||
Write-Host "Downloading $($item.Name)..."
|
Write-Host "Downloading $($item.Name)..."
|
||||||
Start-Process -FilePath $aria2Exe -ArgumentList @(
|
$argumentList = @(
|
||||||
"--dir=`"$($outFile | Split-Path)`"",
|
"--dir=`"$($outFile | Split-Path)`"",
|
||||||
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
||||||
"--allow-overwrite=true",
|
"--allow-overwrite=true",
|
||||||
|
|
@ -110,9 +110,12 @@ function Main {
|
||||||
"--max-connection-per-server=8",
|
"--max-connection-per-server=8",
|
||||||
"--split=8",
|
"--split=8",
|
||||||
"--min-split-size=1M",
|
"--min-split-size=1M",
|
||||||
"$regionalWorkaround",
|
|
||||||
"`"$($item.Url)`""
|
"`"$($item.Url)`""
|
||||||
) -NoNewWindow -Wait
|
)
|
||||||
|
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
|
||||||
|
$argumentList += $regionalWorkaround
|
||||||
|
}
|
||||||
|
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Install VC++ Redistributables ---
|
# --- Install VC++ Redistributables ---
|
||||||
|
|
|
||||||
9
dx
9
dx
|
|
@ -88,7 +88,7 @@ function Main {
|
||||||
foreach ($item in $downloads) {
|
foreach ($item in $downloads) {
|
||||||
$outFile = Join-Path $tempDir $item.Name
|
$outFile = Join-Path $tempDir $item.Name
|
||||||
Write-Host "Downloading $($item.Name)..."
|
Write-Host "Downloading $($item.Name)..."
|
||||||
Start-Process -FilePath $aria2Exe -ArgumentList @(
|
$argumentList = @(
|
||||||
"--dir=`"$($outFile | Split-Path)`"",
|
"--dir=`"$($outFile | Split-Path)`"",
|
||||||
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
||||||
"--allow-overwrite=true",
|
"--allow-overwrite=true",
|
||||||
|
|
@ -96,9 +96,12 @@ function Main {
|
||||||
"--max-connection-per-server=8",
|
"--max-connection-per-server=8",
|
||||||
"--split=8",
|
"--split=8",
|
||||||
"--min-split-size=1M",
|
"--min-split-size=1M",
|
||||||
"$regionalWorkaround",
|
|
||||||
"`"$($item.Url)`""
|
"`"$($item.Url)`""
|
||||||
) -NoNewWindow -Wait
|
)
|
||||||
|
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
|
||||||
|
$argumentList += $regionalWorkaround
|
||||||
|
}
|
||||||
|
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Install DirectX ---
|
# --- Install DirectX ---
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ function Main {
|
||||||
}
|
}
|
||||||
$outFile = Join-Path $tempDir $item.Name
|
$outFile = Join-Path $tempDir $item.Name
|
||||||
Write-Host "Downloading $($item.Name)..."
|
Write-Host "Downloading $($item.Name)..."
|
||||||
Start-Process -FilePath $aria2Exe -ArgumentList @(
|
$argumentList = @(
|
||||||
"--dir=`"$($outFile | Split-Path)`"",
|
"--dir=`"$($outFile | Split-Path)`"",
|
||||||
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
"--out=`"$(Split-Path -Leaf $outFile)`"",
|
||||||
"--allow-overwrite=true",
|
"--allow-overwrite=true",
|
||||||
|
|
@ -115,9 +115,12 @@ function Main {
|
||||||
"--max-connection-per-server=8",
|
"--max-connection-per-server=8",
|
||||||
"--split=8",
|
"--split=8",
|
||||||
"--min-split-size=1M",
|
"--min-split-size=1M",
|
||||||
"$regionalWorkaround",
|
|
||||||
"`"$($item.Url)`""
|
"`"$($item.Url)`""
|
||||||
) -NoNewWindow -Wait
|
)
|
||||||
|
if (![string]::IsNullOrEmpty($regionalWorkaround)) {
|
||||||
|
$argumentList += $regionalWorkaround
|
||||||
|
}
|
||||||
|
Start-Process -FilePath $aria2Exe -ArgumentList $argumentList -NoNewWindow -Wait
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Install DirectX ---
|
# --- Install DirectX ---
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue