From 251d69c4ff1a6dfa72d4a6808e53e949accfa6a7 Mon Sep 17 00:00:00 2001 From: Mock Date: Fri, 10 Apr 2026 11:55:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8bash?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/dev/start-ros-receiver.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/dev/start-ros-receiver.sh b/scripts/dev/start-ros-receiver.sh index 449432d..2c17850 100755 --- a/scripts/dev/start-ros-receiver.sh +++ b/scripts/dev/start-ros-receiver.sh @@ -2,14 +2,20 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +source_with_nounset_off() { + set +u + # shellcheck disable=SC1090 + source "$1" + set -u +} + # shellcheck disable=SC1091 source "${SCRIPT_DIR}/load-env.sh" -# shellcheck disable=SC1091 -source "/opt/ros/${ROS_DISTRO}/setup.bash" +source_with_nounset_off "/opt/ros/${ROS_DISTRO}/setup.bash" cd "${ROS_CONTROL_PY_DIR}" -# shellcheck disable=SC1091 -source "install/setup.bash" +source_with_nounset_off "install/setup.bash" exec ros2 launch udp_teleop_bridge robot_udp_receiver.launch.py \ "transport:=${ROBOT_RECEIVER_TRANSPORT}" \