diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2025-01-08 17:48:20 -0500 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2025-01-08 17:57:05 -0500 |
commit | 3195ddf9f125fd8f9c80afc5d0868106bd90a20d (patch) | |
tree | 409c5ab2e51f21f88d3600566ff186dac929e86a | |
parent | 3813013d69873a83038d45311a94636741f45a9e (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.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm index 700da05f..15dd0540 100644 --- a/nonguix/multiarch-container.scm +++ b/nonguix/multiarch-container.scm @@ -342,8 +342,11 @@ in a sandboxed FHS environment." ,@(exists-> (getenv "XAUTHORITY")) #$@(ngc-shared container))) (DEBUG (equal? (getenv "DEBUG") "1")) - (extra-shares (if (getenv "GUIX_SANDBOX_EXTRA_SHARES") - (string-split (getenv "GUIX_SANDBOX_EXTRA_SHARES") #\:) + ;; Make sure this environment variable is not set to the + ;; emptry string or else guix shell will fail to start. + (extra-shares-env (getenv "GUIX_SANDBOX_EXTRA_SHARES")) + (extra-shares (if (and extra-shares-env (not (string= extra-shares-env ""))) + (string-split extra-shares-env #\:) #f)) (args (cdr (command-line))) (command (if DEBUG '() |