internal/system: pass syscall error message
All checks were successful
Test / Create distribution (push) Successful in 37s
Test / Sandbox (push) Successful in 2m43s
Test / Sandbox (race detector) (push) Successful in 4m43s
Test / Hakurei (push) Successful in 5m2s
Test / Hpkg (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 6m25s
Test / Flake checks (push) Successful in 1m32s

This makes wrapped syscall errors produce a cleaner error message.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-07 02:08:05 +09:00
parent 503bfc6468
commit 246e04214a
2 changed files with 6 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ func (e *OpError) Error() string {
switch {
case errors.As(e.Err, new(*os.PathError)),
errors.As(e.Err, new(*os.LinkError)),
errors.As(e.Err, new(*os.SyscallError)),
errors.As(e.Err, new(*net.OpError)),
errors.As(e.Err, new(*container.StartError)):
return e.Err.Error()