diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-27 01:22:40 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-27 01:22:40 +0900 |
| commit | 300571af4777c8322bc0c7fafdf18a5879c237e6 (patch) | |
| tree | 64872676dd0c4aa61d6b19982c80b8e9f87e3e9f /internal | |
| parent | 32c90ef4e737f25f57cfa9f493c9cd7f6950c508 (diff) | |
app: pass through $SHELL
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/app/app_nixos_test.go | 1 | ||||
| -rw-r--r-- | internal/app/app_pd_test.go | 2 | ||||
| -rw-r--r-- | internal/app/seal.go | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/internal/app/app_nixos_test.go b/internal/app/app_nixos_test.go index e6fb3700..d93b32ec 100644 --- a/internal/app/app_nixos_test.go +++ b/internal/app/app_nixos_test.go @@ -101,6 +101,7 @@ var testCasesNixos = []sealTestCase{ "HOME=/var/lib/persist/module/fortify/0/1", "PULSE_COOKIE=" + fst.Tmp + "/pulse-cookie", "PULSE_SERVER=unix:/run/user/1971/pulse/native", + "SHELL=/run/current-system/sw/bin/zsh", "TERM=xterm-256color", "USER=u0_a1", "WAYLAND_DISPLAY=wayland-0", diff --git a/internal/app/app_pd_test.go b/internal/app/app_pd_test.go index d7fbc2b8..3329cdac 100644 --- a/internal/app/app_pd_test.go +++ b/internal/app/app_pd_test.go @@ -41,6 +41,7 @@ var testCasesPd = []sealTestCase{ Args: []string{"/run/current-system/sw/bin/zsh"}, Env: []string{ "HOME=/home/chronos", + "SHELL=/run/current-system/sw/bin/zsh", "TERM=xterm-256color", "USER=chronos", "XDG_RUNTIME_DIR=/run/user/65534", @@ -259,6 +260,7 @@ var testCasesPd = []sealTestCase{ "HOME=/home/chronos", "PULSE_COOKIE=" + fst.Tmp + "/pulse-cookie", "PULSE_SERVER=unix:/run/user/65534/pulse/native", + "SHELL=/run/current-system/sw/bin/zsh", "TERM=xterm-256color", "USER=chronos", "WAYLAND_DISPLAY=wayland-0", diff --git a/internal/app/seal.go b/internal/app/seal.go index 80e95370..9d338780 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -255,8 +255,9 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *fst.Co mapuid = newInt(uid) mapgid = newInt(gid) if seal.env == nil { - seal.env = make(map[string]string) + seal.env = make(map[string]string, 1<<6) } + seal.env[shell] = shellPath } /* |
