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.
This commit is contained in:
Christopher Baines 2023-07-11 16:00:20 +01:00 committed by Nicolas Goaziou
parent 32e48b8b43
commit c1f7156d55
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 4 additions and 1 deletions

View File

@ -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