From 21a4749488af1b6120ad38ac2715bb878881db2e Mon Sep 17 00:00:00 2001 From: Rutherther Date: Wed, 3 Sep 2025 21:04:10 +0200 Subject: [PATCH] fix(environment): check directory exists before copying files --- modules/ruther/build/environment.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/ruther/build/environment.scm b/modules/ruther/build/environment.scm index 65dea18a4519ff4a928f49538d5f0476701f78be..39e2b6c72548812c6a242435fea6ec72a908b3de 100644 --- a/modules/ruther/build/environment.scm +++ b/modules/ruther/build/environment.scm @@ -94,11 +94,12 @@ and exec input-file" (define (copy-extra-files output profile-path extra-folders) (for-each (lambda (extra-path) - (when (string-contains extra-path "/") - (mkdir-p (string-append output "/" (dirname extra-path)))) - (union-build (string-append output "/" extra-path) - (list (string-append profile-path "/" extra-path)) - #:create-all-directories? #t)) + (when (file-exists? (string-append profile-path "/" extra-path)) + (when (string-contains extra-path "/") + (mkdir-p (string-append output "/" (dirname extra-path)))) + (union-build (string-append output "/" extra-path) + (list (string-append profile-path "/" extra-path)) + #:create-all-directories? #t))) extra-folders)) (define* (copy-binary-files output