From a52f7038e5a607dd0901244abb791c96deaf9c2d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 29 Oct 2025 04:09:42 +0900 Subject: 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 --- internal/app/outcome.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/app/outcome.go') 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, } -- cgit v1.3.1