aboutsummaryrefslogtreecommitdiff
path: root/guix/svn-download.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-07-11 16:00:20 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-07-18 18:16:55 +0200
commitc1f7156d55bdc83f93f00f6f9b8e9d81916e4a54 (patch)
tree80a57d7b123c29f9b35ce2a694637ed110a6b4a2 /guix/svn-download.scm
parent32e48b8b43c7450f5d05f786d13fe62a71fcb068 (diff)
downloadguix-c1f7156d55bdc83f93f00f6f9b8e9d81916e4a54.tar
guix-c1f7156d55bdc83f93f00f6f9b8e9d81916e4a54.tar.gz
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.
Diffstat (limited to 'guix/svn-download.scm')
-rw-r--r--guix/svn-download.scm5
1 files changed, 4 insertions, 1 deletions
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 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
#: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