diff --git a/internal/system/output.go b/internal/system/output.go index a1666dc..80ab88e 100644 --- a/internal/system/output.go +++ b/internal/system/output.go @@ -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() diff --git a/internal/system/output_test.go b/internal/system/output_test.go index c0cbfdf..54d1225 100644 --- a/internal/system/output_test.go +++ b/internal/system/output_test.go @@ -44,6 +44,11 @@ func TestOpError(t *testing.T) { syscall.EISDIR, syscall.ENOTDIR, "cannot stat /run/dbus: is a directory"}, + {"syscall", newOpError("pipewire", os.NewSyscallError("pipe2", syscall.ENOTRECOVERABLE), false), + "pipe2: state not recoverable", + syscall.ENOTRECOVERABLE, syscall.ENOTDIR, + "cannot pipe2: state not recoverable"}, + {"net", newOpError("wayland", &net.OpError{Op: "dial", Net: "unix", Addr: &net.UnixAddr{Name: "/run/user/1000/wayland-1", Net: "unix"}, Err: syscall.ENOENT}, false), "dial unix /run/user/1000/wayland-1: no such file or directory", syscall.ENOENT, syscall.EPERM,