mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-08-29 09:36:37 +00:00
don't try to show download % if output is redirected, see lukesampson/psutils#2
This commit is contained in:
@@ -46,6 +46,12 @@ function dl_with_cache($app, $version, $url, $to) {
|
||||
}
|
||||
|
||||
function dl_progress($url, $to) {
|
||||
if([console]::isoutputredirected) {
|
||||
# can't set cursor position: just do simple download
|
||||
(new-object net.webclient).downloadfile($url, $to)
|
||||
return
|
||||
}
|
||||
|
||||
$left = [console]::cursorleft
|
||||
$top = [console]::cursortop
|
||||
|
||||
|
||||
Reference in New Issue
Block a user