From 5be0286561398debfee2c0610e51f006ef2dc2fb Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Sat, 20 Jul 2013 23:02:23 +1000 Subject: [PATCH] fix: interrupt download causes partial cache file to be used for next install --- lib/install.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/install.ps1 b/lib/install.ps1 index c2b17b733..ffe3230dd 100644 --- a/lib/install.ps1 +++ b/lib/install.ps1 @@ -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