fix: interrupt download causes partial cache file to be used for next install

This commit is contained in:
Luke Sampson
2013-07-20 23:02:23 +10:00
parent 11837340d2
commit 5be0286561
+2 -1
View File
@@ -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