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

edit-desc: fix error handling to get proper return code #605

Merged
merged 1 commit into from Mar 19, 2016

Conversation

thiell
Copy link

@thiell thiell commented Mar 19, 2016

This patch improves error handling in EditDescription.
drive edit-desc returned 0 in some cases, like "remote path doesn't exist".

Fix the following issue where rc=0:

$ drive edit-desc gdrive/regal/e6/2d/bb/0x200010896:0x1f237:0x0
Using an empty description will clear out the previous one
Proceed with the changes? [Y/n]:y
/gdrive/regal/e6/2d/bb/0x200010896:0x1f237:0x0: remote path doesn't exist
$ echo $?
0

With this patch, rc=1 instead.

This patch improves error handling of EditDescription. drive edit-desc
returned 0 in some cases, like "remote path doesn't exist".
@odeke-em
Copy link
Owner

Hello there @thiell, thank you for the patch and welcome to drive!

LGTM! Good stuff.

odeke-em pushed a commit that referenced this pull request Mar 19, 2016
edit-desc: fix error handling to get proper return code
@odeke-em odeke-em merged commit 062afd4 into odeke-em:master Mar 19, 2016
@odeke-em odeke-em added this to the v0.3.6 milestone Mar 19, 2016
@thiell
Copy link
Author

thiell commented Mar 19, 2016

Hi @odeke-em - great, that was fast! Thank You!

@odeke-em
Copy link
Owner

Hehe, I happened to be by computer. Good catch btw!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants