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

Return 1 if the package name in rospack plugins can not be found #51

Merged
merged 1 commit into from
Dec 9, 2015

Conversation

esteve
Copy link
Member

@esteve esteve commented Dec 9, 2015

@hugomatic and I found out that if a user passes an invalid package name to rospack plugins, the error code is still 0:

$ rospack plugins --attrib=plugin pluginliba; echo $?
[rospack] Warning: no such package pluginliba
0

being analogous to ls:

$ ls invalid_path ; echo $?
ls: cannot access invalid_path: No such file or directory
2

This PR changes the behavior to return 1:

$ rospack plugins --attrib=plugin pluginliba; echo $?
[rospack] Warning: no such package pluginliba
1

@dirk-thomas
Copy link
Member

Should the message then be change to "error" and go to stderr?

@esteve
Copy link
Member Author

esteve commented Dec 9, 2015

It already goes to stderr, but I can change the code to call logError if you like.

@dirk-thomas
Copy link
Member

Since its not a warning anymore (rc != 0) please change it to logError.

@esteve esteve force-pushed the plugins_return_code branch from 2d09198 to 6420a5d Compare December 9, 2015 21:18
@esteve
Copy link
Member Author

esteve commented Dec 9, 2015

Fixed.

@dirk-thomas
Copy link
Member

lgtm

esteve added a commit that referenced this pull request Dec 9, 2015
Return 1 if the package name in rospack plugins can not be found
@esteve esteve merged commit 9f5f18e into indigo-devel Dec 9, 2015
@esteve esteve deleted the plugins_return_code branch December 9, 2015 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants