From 34c57cc5b56fb65f1bae8039c881ac63ef446e0c Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 4 Jan 2023 16:30:18 -0500 Subject: [PATCH] px4-rc.simulator shellcheck fixes --- ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator b/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator index 477b658d73..fff745b135 100644 --- a/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator +++ b/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator @@ -29,14 +29,14 @@ elif [ "$PX4_SIMULATOR" = "gz" ]; then # "gz sim" only avaiilable in Garden and later GZ_SIM_VERSIONS=$(gz sim --versions 2>&1) - if [ $? -eq 0 ] + if [ $? -eq 0 ] && [ "${GZ_SIM_VERSIONS}" != "" ] then # "gz sim" from Garden on gz_command="gz" gz_sub_command="sim" else IGN_GAZEBO_VERSIONS=$(ign gazebo --versions 2>&1) - if [ $? -eq 0 ] + if [ $? -eq 0 ] && [ "${IGN_GAZEBO_VERSIONS}" != "" ] then # "ign gazebo" for Fortress and earlier gz_command="ign"