summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-06-15 11:02:54 +0200
committerLudovic Courtès <ludo@gnu.org>2022-06-15 23:49:23 +0200
commit5d4b18912048b67c144bc56a7bedc8252cbeb932 (patch)
tree1ae9cf0da9a51bb8550488f855f639f5e76ecc51
parent1cde647cc05c640fbfa6f9779a0d7854bb90e153 (diff)
downloadguix-patches-5d4b18912048b67c144bc56a7bedc8252cbeb932.tar
guix-patches-5d4b18912048b67c144bc56a7bedc8252cbeb932.tar.gz
challenge: When using '--diff', do not attempt to chmod symlinks.
This is a followup to 2a2856d5ccd9a9b7df8a94333a277b971a39b150. * guix/scripts/challenge.scm (make-directory-writable): Do not call 'make-file-writable' on symlinks.
-rw-r--r--guix/scripts/challenge.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 72d3e850f2..96ffe53a85 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -316,7 +316,8 @@ specified in COMPARISON-REPORT."
'chmod -R +w DIRECTORY'."
(file-system-fold (const #t)
(lambda (file stat _) ;leaf
- (make-file-writable file))
+ (unless (eq? 'symlink (stat:type stat))
+ (make-file-writable file)))
(lambda (directory stat _) ;down
(make-file-writable directory))
(const #t) ;up