From b5092829e222647f0afcc4c139357dc981d554d1 Mon Sep 17 00:00:00 2001 From: Brian Bingham Date: Fri, 22 Nov 2024 09:48:54 -0800 Subject: [PATCH] Enable tests to fail gracefully --- scripts/run_dev.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/run_dev.sh b/scripts/run_dev.sh index 9f1c849b..f7f1770d 100755 --- a/scripts/run_dev.sh +++ b/scripts/run_dev.sh @@ -138,16 +138,22 @@ if [[ -z "$(docker ps)" ]] ; then fi # Check if git-lfs is installed. +set +e git lfs &>/dev/null -if [[ $? -ne 0 ]] ; then +ECODE=$? +set -e +if [[ $ECODE -ne 0 ]] ; then print_error "git-lfs is not insalled. Please make sure git-lfs is installed before you clone the repo." exit 1 fi # Check if all LFS files are in place in the repository where this script is running from. cd $ROOT +set +e git rev-parse &>/dev/null -if [[ $? -eq 0 ]]; then +ECODE=$? +set -e +if [[ $ECODE -eq 0 ]]; then LFS_FILES_STATUS=$(cd $ISAAC_ROS_DEV_DIR && git lfs ls-files | cut -d ' ' -f2) for (( i=0; i<${#LFS_FILES_STATUS}; i++ )); do f="${LFS_FILES_STATUS:$i:1}"