Skip to content

Commit

Permalink
[flang] Fix a bug in the flang wrapper script
Browse files Browse the repository at this point in the history
Please see
flang-compiler#1344 (comment)
for context and the discussion.

Differential Revision: https://reviews.llvm.org/D117297
  • Loading branch information
banach-space committed Jan 14, 2022
1 parent 5e4966c commit ad64355
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions flang/tools/f18/flang
Expand Up @@ -30,8 +30,9 @@ PRINT_VERSION="False"

# === check_bash_version ======================================================
#
# Checks the Bash version that's used to run this script. Exits immediately if
# it's lower than 4.4
# Checks the Bash version that's used to run this script. Exits immediately
# with a non-zero return code if it's lower than 4.4. Otherwise returns 0
# (success).
# =============================================================================
check_bash_version() {
message="Error: Your Bash is too old. Please use Bash >= 4.4"
Expand All @@ -42,6 +43,8 @@ check_bash_version() {
if [[ "${BASH_VERSINFO[0]}" == 4 ]]; then
[[ "${BASH_VERSINFO[1]:-0}" -lt 4 ]] && echo $message && exit 1
fi

return 0
}

# === parse_args ==============================================================
Expand Down

0 comments on commit ad64355

Please sign in to comment.