Skip to content

Commit

Permalink
grid_submit.sh : Better error avoidance/handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sawenzel committed Mar 28, 2024
1 parent 8e214ec commit addb388
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions GRID/utils/grid_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ export CONTROLSERVER
export PRODSPLIT
[[ $PRODSPLIT -gt 100 ]] && echo "Production split needs to be smaller than 100 for the moment" && exit 1

# check for presence of jq (needed in code path to fetch output files)
[[ "$FETCHOUTPUT" ]] && { which jq &> /dev/null || { echo "Could not find jq command. Please load or install" && exit 1; }; }

# check if script is actually a valid file and fail early if not
[[ "${SCRIPT}" ]] && [[ ! -f "${SCRIPT}" ]] && echo "Script file ${SCRIPT} does not exist .. aborting" && exit 1

# analyse options:
# we should either run with --script or with -c
[ "${SCRIPT}" ] && [ "$CONTINUE_WORKDIR" ] && echo "Script and continue mode not possible at same time" && exit 1
Expand Down

0 comments on commit addb388

Please sign in to comment.