diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-29 04:09:42 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-29 04:11:49 +0900 |
| commit | a52f7038e5a607dd0901244abb791c96deaf9c2d (patch) | |
| tree | 2184b7313cf3b2d783778e8272ac22d0eaa1603f /internal/app/outcome.go | |
| parent | 274686d10d3386a41f8fb6bc3363269a734afe0e (diff) | |
internal/env: relocate from app
This package is much cleaner to stub independently, and makes no sense to lump into app.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/outcome.go')
| -rw-r--r-- | internal/app/outcome.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/app/outcome.go b/internal/app/outcome.go index 237095af..59cdfbd8 100644 --- a/internal/app/outcome.go +++ b/internal/app/outcome.go @@ -8,6 +8,7 @@ import ( "hakurei.app/container" "hakurei.app/container/check" "hakurei.app/hst" + "hakurei.app/internal/env" "hakurei.app/message" "hakurei.app/system" "hakurei.app/system/acl" @@ -58,7 +59,7 @@ type outcomeState struct { // Copied from [EnvPaths] per-process. sc hst.Paths - *EnvPaths + *env.Paths // Copied via populateLocal. k syscallDispatcher @@ -72,7 +73,7 @@ func (s *outcomeState) valid() bool { s.Shim.valid() && s.ID != nil && s.Container != nil && - s.EnvPaths != nil + s.Paths != nil } // newOutcomeState returns the address of a new outcomeState with its exported fields populated via syscallDispatcher. @@ -82,7 +83,7 @@ func newOutcomeState(k syscallDispatcher, msg message.Msg, id *hst.ID, config *h ID: id, Identity: config.Identity, UserID: hsu.MustID(msg), - EnvPaths: copyPaths(k), + Paths: env.CopyPathsFunc(k.fatalf, k.tempdir, func(key string) string { v, _ := k.lookupEnv(key); return v }), Container: config.Container, } |
