Skip to content

Commit

Permalink
add --first-only option to catkin_find invocation to be defensive (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jun 9, 2015
1 parent a475c05 commit bd49938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/rosbash/rosbash
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function rosls {
function _roscmd {
local pkgdir exepath opt catkin_package_libexec_dir opts
if [[ -n $CMAKE_PREFIX_PATH ]]; then
catkin_package_libexec_dir=`catkin_find --without-underlays --libexec $1 2> /dev/null`
catkin_package_libexec_dir=`catkin_find --first-only --without-underlays --libexec $1 2> /dev/null`
fi
pkgdir=`_ros_package_find $1`
if [[ -z $catkin_package_libexec_dir && -z $pkgdir ]]; then
Expand Down Expand Up @@ -435,7 +435,7 @@ function _roscomplete_find {
local pkg=${2}
local arg=${3}
if [[ -n $CMAKE_PREFIX_PATH ]]; then
catkin_package_libexec_dir=`catkin_find --without-underlays --libexec ${pkg} 2> /dev/null`
catkin_package_libexec_dir=`catkin_find --first-only --without-underlays --libexec ${pkg} 2> /dev/null`
fi
pkgdir=`_ros_package_find ${pkg}`
if [[ -n "$catkin_package_libexec_dir" || -n "$pkgdir" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion tools/rosbash/roszsh
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function _roscomplete_search_dir {
fi
pkgdir=`export ROS_CACHE_TIMEOUT=-1.0 && rospack find ${pkg} 2> /dev/null`
pkgdir_result=$?
catkin_package_libexec_dir=`catkin_find --without-underlays --libexec ${pkg} 2> /dev/null`
catkin_package_libexec_dir=`catkin_find --first-only --without-underlays --libexec ${pkg} 2> /dev/null`
if [[ $? != 0 ]]
then
catkin_package_libexec_dir=""
Expand Down

0 comments on commit bd49938

Please sign in to comment.