diff --git a/guix/build/download.scm b/guix/build/download.scm index c647d00f6b..46af149b2f 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -693,6 +693,13 @@ otherwise simply ignore them." (() (format (current-error-port) "failed to download ~s from ~s~%" file url) + + ;; Remove FILE in case we made an incomplete download, for example due + ;; to ENOSPC. + (catch 'system-error + (lambda () + (delete-file file)) + (const #f)) #f)))) ;;; download.scm ends here