From bd499387058e07beb8f14eacc7f1e3bf7507dfa8 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Tue, 9 Jun 2015 10:31:17 -0700 Subject: [PATCH] add --first-only option to catkin_find invocation to be defensive (#83) --- tools/rosbash/rosbash | 4 ++-- tools/rosbash/roszsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/rosbash/rosbash b/tools/rosbash/rosbash index 57847d1e..6a2d9b87 100644 --- a/tools/rosbash/rosbash +++ b/tools/rosbash/rosbash @@ -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 @@ -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 diff --git a/tools/rosbash/roszsh b/tools/rosbash/roszsh index c9413697..1c218ef1 100644 --- a/tools/rosbash/roszsh +++ b/tools/rosbash/roszsh @@ -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=""