summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
Diffstat (limited to 'guix')
-rw-r--r--guix/forge/forge.scm15
1 files changed, 10 insertions, 5 deletions
diff --git a/guix/forge/forge.scm b/guix/forge/forge.scm
index e3a6504..ca8128c 100644
--- a/guix/forge/forge.scm
+++ b/guix/forge/forge.scm
@@ -158,11 +158,16 @@
(when description
(call-with-output-file (string-append repository "/description")
(cut put-string <> description)))
- ;; Set ownership of repository files.
- (for-each (lambda (file)
- (let ((user (getpw username)))
- (chown file (passwd:uid user) (passwd:gid user))))
- (append (find-regular-files repository))))
+ ;; Set ownership of repository files when the
+ ;; user field is set. This enables setups where
+ ;; ownership is manually managed. TODO: Rethink
+ ;; this when we move to repositories owned and
+ ;; operated on by virtual users.
+ (when username
+ (for-each (lambda (file)
+ (let ((user (getpw username)))
+ (chown file (passwd:uid user) (passwd:gid user))))
+ (append (find-regular-files repository)))))
;; Install post receive hook.
(when (eq? ci-jobs-trigger-type 'post-receive-hook)
(let ((hook-link (string-append repository "/hooks/post-receive")))