From c1f7156d55bdc83f93f00f6f9b8e9d81916e4a54 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 11 Jul 2023 16:00:20 +0100 Subject: [PATCH] svn-download: Handle the single file case when downloading a nar. Delete the output so that download-nar doesn't error when trying to restore. * guix/svn-download.scm (svn-multi-fetch): Delete the output if it exists prior to calling download-nar. --- guix/svn-download.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/svn-download.scm b/guix/svn-download.scm index 78b13f62a4..c6688908de 100644 --- a/guix/svn-download.scm +++ b/guix/svn-download.scm @@ -203,7 +203,10 @@ (define build #:password (getenv "svn password"))) (call-with-input-string (getenv "svn locations") read)) - (download-nar #$output)))))) + (begin + (when (file-exists? #$output) + (delete-file-recursively #$output)) + (download-nar #$output))))))) (mlet %store-monad ((guile (package->derivation guile system))) (gexp->derivation (or name "svn-checkout") build