aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-10-16 14:07:02 +0100
committerChristopher Baines <mail@cbaines.net>2023-10-16 14:07:02 +0100
commit9621f0ab61c4f2de1e613095db0f130a912b0f93 (patch)
tree207278883fa50eddc34c1ebfabc4223de411f743
parent750c92ab8ac4b3458e63bee150c124c391248a8f (diff)
downloadqa-frontpage-9621f0ab61c4f2de1e613095db0f130a912b0f93.tar
qa-frontpage-9621f0ab61c4f2de1e613095db0f130a912b0f93.tar.gz
Make ensure-repository-exist! work in fibers
Assuming the repository exists, which it generally will.
-rw-r--r--guix-qa-frontpage/git-repository.scm34
1 files changed, 17 insertions, 17 deletions
diff --git a/guix-qa-frontpage/git-repository.scm b/guix-qa-frontpage/git-repository.scm
index a0b4eca..ec6996f 100644
--- a/guix-qa-frontpage/git-repository.scm
+++ b/guix-qa-frontpage/git-repository.scm
@@ -37,23 +37,23 @@
(thunk))))
(define (ensure-repository-exists!)
- (when (current-scheduler)
- (error "guix.git-excursion can't be used from fibers"))
-
- (monitor
- (unless (file-exists? (%git-repository-location))
- (invoke "git" "init" "--bare"
- (%git-repository-location))
-
- (guix.git-excursion
- (lambda ()
- (invoke "git" "remote" "add" "origin"
- "https://git.savannah.gnu.org/git/guix.git")
- (invoke "git" "remote" "add" "patches"
- "git@git.guix-patches.cbaines.net:guix-patches")
-
- (invoke "git" "config" "user.name" "Guix Patches Tester")
- (invoke "git" "config" "user.email" ""))))))
+ (unless (file-exists? (%git-repository-location))
+ (when (current-scheduler)
+ (error "guix.git-excursion can't be used from fibers"))
+ (monitor
+ (unless (file-exists? (%git-repository-location))
+ (invoke "git" "init" "--bare"
+ (%git-repository-location))
+
+ (guix.git-excursion
+ (lambda ()
+ (invoke "git" "remote" "add" "origin"
+ "https://git.savannah.gnu.org/git/guix.git")
+ (invoke "git" "remote" "add" "patches"
+ "git@git.guix-patches.cbaines.net:guix-patches")
+
+ (invoke "git" "config" "user.name" "Guix Patches Tester")
+ (invoke "git" "config" "user.email" "")))))))
(define (update-repository!)
(with-bare-git-repository