Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nil check before convert typed error back #20

Closed
wants to merge 1 commit into from

Conversation

vizv
Copy link
Contributor

@vizv vizv commented Apr 18, 2020

Since errors.As(err, target) returns false when err is nil,
which cause status set to 1 when no error occurs for IpcGetOperation and IpcSetOperation.

Should be able to fix #17

Signed-off-by: Wenxuan Zhao viz@linux.com

Since errors.As(err, target) returns false when err is nil,
which cause status set to 1 when no error occurs for Ipc{Get,Set}Operation.

Signed-off-by: Wenxuan Zhao <viz@linux.com>
@maxsofty
Copy link

it look better

@crawshaw
Copy link
Collaborator

crawshaw commented May 1, 2020

LGTM, thanks, I didn't realize this was broken.

@vizv
Copy link
Contributor Author

vizv commented May 2, 2020

Closed as it's merged in 75a41b2

@vizv vizv closed this May 2, 2020
@vizv vizv deleted the fix-error-conversion branch May 2, 2020 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants