Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion industrial_ci/src/workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,19 @@ function ici_exec_in_workspace {
function ici_install_dependencies {
local extend=$1; shift
local skip_keys=$1; shift

local cmake_prefix_path
if [ "$ROS_VERSION" -eq 2 ]; then
# work-around for https://github.com/ros-infrastructure/rosdep/issues/724
cmake_prefix_path="$(ici_exec_in_workspace "$extend" . env | grep -oP '^CMAKE_PREFIX_PATH=\K.*'):" || true
fi

rosdep_opts=(-q --from-paths "$@" --ignore-src -y)
if [ -n "$skip_keys" ]; then
rosdep_opts+=(--skip-keys "$skip_keys")
fi
set -o pipefail # fail if rosdep install fails
ici_exec_in_workspace "$extend" "." rosdep install "${rosdep_opts[@]}" | { grep "executing command" || true; }
ROS_PACKAGE_PATH="$cmake_prefix_path$ROS_PACKAGE_PATH" ici_exec_in_workspace "$extend" "." rosdep install "${rosdep_opts[@]}" | { grep "executing command" || true; }
set +o pipefail
}

Expand Down