summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2025-01-08 17:48:20 -0500
committerJohn Kehayias <john.kehayias@protonmail.com>2025-01-08 17:57:05 -0500
commit3195ddf9f125fd8f9c80afc5d0868106bd90a20d (patch)
tree409c5ab2e51f21f88d3600566ff186dac929e86a
parent3813013d69873a83038d45311a94636741f45a9e (diff)
nonguix: multiarch-container: Handle empty shares env variable.
Launching a package, like steam, with GUIX_SANDBOX_EXTRA_SHARES= (set to an empty string) will cause guix shell to fail to launch with "guix shell: error: statfs: : No such file or directory". * nonguix/multiarch-container.scm (make-container-wrapper): Check that the environment variable GUIX_SANDBOX_EXTRA_SHARES is both set and not an empty string. Reported-by: apoorv569
-rw-r--r--nonguix/multiarch-container.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm
index 700da05..15dd054 100644
--- a/nonguix/multiarch-container.scm
+++ b/nonguix/multiarch-container.scm
@@ -342,8 +342,11 @@ in a sandboxed FHS environment."
342 ,@(exists-> (getenv "XAUTHORITY")) 342 ,@(exists-> (getenv "XAUTHORITY"))
343 #$@(ngc-shared container))) 343 #$@(ngc-shared container)))
344 (DEBUG (equal? (getenv "DEBUG") "1")) 344 (DEBUG (equal? (getenv "DEBUG") "1"))
345 (extra-shares (if (getenv "GUIX_SANDBOX_EXTRA_SHARES") 345 ;; Make sure this environment variable is not set to the
346 (string-split (getenv "GUIX_SANDBOX_EXTRA_SHARES") #\:) 346 ;; emptry string or else guix shell will fail to start.
347 (extra-shares-env (getenv "GUIX_SANDBOX_EXTRA_SHARES"))
348 (extra-shares (if (and extra-shares-env (not (string= extra-shares-env "")))
349 (string-split extra-shares-env #\:)
347 #f)) 350 #f))
348 (args (cdr (command-line))) 351 (args (cdr (command-line)))
349 (command (if DEBUG '() 352 (command (if DEBUG '()