mirror of
https://github.com/cmderdev/cmder.git
synced 2025-02-04 12:39:07 +08:00
In powershell you pretty much never want to use Write-Host, its output can't be redirected along the pipeline. You couldn't pipe this output to a logfile.
This commit is contained in:
parent
1225d410fa
commit
5243d8bb8d
@ -79,7 +79,7 @@ Push-Location -Path $saveTo
|
|||||||
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
||||||
|
|
||||||
foreach ($s in $sources) {
|
foreach ($s in $sources) {
|
||||||
Write-Host "Getting $($s.name) from URL $($s.url)"
|
Write-Output "Getting $($s.name) from URL $($s.url)"
|
||||||
|
|
||||||
# We do not care about the extensions/type of archive
|
# We do not care about the extensions/type of archive
|
||||||
$tempArchive = "$($s.name).tmp"
|
$tempArchive = "$($s.name).tmp"
|
||||||
@ -97,4 +97,4 @@ foreach ($s in $sources) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Pop-Location
|
Pop-Location
|
||||||
Write-Host "All good and done!"
|
Write-Output "All good and done!"
|
Loading…
Reference in New Issue
Block a user