container/absolute: wrap safe stdlib functions
All checks were successful
Test / Create distribution (push) Successful in 34s
Test / Sandbox (push) Successful in 2m0s
Test / Hakurei (push) Successful in 2m57s
Test / Hpkg (push) Successful in 3m52s
Test / Sandbox (race detector) (push) Successful in 4m4s
Test / Hakurei (race detector) (push) Successful in 4m49s
Test / Flake checks (push) Successful in 1m31s

These functions do not change the absoluteness of a pathname.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-10 03:10:13 +09:00
parent 02271583fb
commit 41ac2be965
4 changed files with 64 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ func Exec(ctx context.Context, p string) ([]*Entry, error) {
var toolPath *container.Absolute
if s, err := exec.LookPath(lddName); err != nil {
return nil, err
} else if toolPath, err = container.NewAbsolute(s); err != nil {
} else if toolPath, err = container.NewAbs(s); err != nil {
return nil, err
}