internal/system: pass syscall error message

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()