mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-23 22:06:07 +00:00
fix: interrupt download causes partial cache file to be used for next install
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@ function dl_with_cache($app, $version, $url, $to) {
|
||||
if(!(test-path $cached)) {
|
||||
$null = ensure $cachedir
|
||||
write-host "downloading $url..." -nonewline
|
||||
dl_progress $url $cached
|
||||
dl_progress $url "$cached.download"
|
||||
mv "$cached.download" $cached
|
||||
write-host "done"
|
||||
} else { write-host "loading $url from cache..."}
|
||||
cp $cached $to
|
||||
|
||||
Reference in New Issue
Block a user