diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-07 20:06:26 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-07 20:57:58 +0900 |
| commit | 0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (patch) | |
| tree | dfe9c40ceb8c1be8d2728a2db9017bffef174d3d /internal/app/env.go | |
| parent | d23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 (diff) | |
container/check: move absolute pathname
This allows use of absolute pathname values without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/env.go')
| -rw-r--r-- | internal/app/env.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/app/env.go b/internal/app/env.go index 4305c665..e6d137fc 100644 --- a/internal/app/env.go +++ b/internal/app/env.go @@ -3,16 +3,16 @@ package app import ( "strconv" - "hakurei.app/container" + "hakurei.app/container/check" "hakurei.app/hst" ) // EnvPaths holds paths copied from the environment and is used to create [hst.Paths]. type EnvPaths struct { // TempDir is returned by [os.TempDir]. - TempDir *container.Absolute + TempDir *check.Absolute // RuntimePath is copied from $XDG_RUNTIME_DIR. - RuntimePath *container.Absolute + RuntimePath *check.Absolute } // Copy expands [EnvPaths] into [hst.Paths]. @@ -43,7 +43,7 @@ func copyPaths(k syscallDispatcher) *EnvPaths { var env EnvPaths - if tempDir, err := container.NewAbs(k.tempdir()); err != nil { + if tempDir, err := check.NewAbs(k.tempdir()); err != nil { k.fatalf("invalid TMPDIR: %v", err) panic("unreachable") } else { @@ -51,7 +51,7 @@ func copyPaths(k syscallDispatcher) *EnvPaths { } r, _ := k.lookupEnv(xdgRuntimeDir) - if a, err := container.NewAbs(r); err == nil { + if a, err := check.NewAbs(r); err == nil { env.RuntimePath = a } |
