Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes misleading "No such file or directory" syntax errors from output files #2688

Merged
9 changes: 6 additions & 3 deletions scripts/exglobal_diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,12 @@ EOFdiag
# Restrict diagnostic files containing rstprod data
rlist="conv_gps conv_ps conv_pw conv_q conv_sst conv_t conv_uv saphir"
for rtype in $rlist; do
set +e
${CHGRP_CMD} *${rtype}*
${STRICT_ON:-set -e}
for rfile in *"${rtype}"*; do
if [[ -s "${rfile}" ]]; then
${CHGRP_CMD} "${rfile}"
fi
${STRICT_ON:-set -e}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If set +e is removed, it's not. There is no need to turn back on something you never turned off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WalterKolczynski-NOAA noted that set +e was no longer needed. Is this? I would assume not but @aerorahul noted above the following #2688 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

done
done

# If requested, create diagnostic file tarballs
Expand Down
Loading