Skip to content

Commit

Permalink
eplace -v Operator to Ensure Compatibility (#1185)
Browse files Browse the repository at this point in the history
Replaced the `-v` operator with a more universally compatible method for variable checking in the bash script. The update uses parameter expansion to check if a variable is set, ensuring the script runs smoothly on environments with different Bash versions.

Issue: #1182
  • Loading branch information
cubxxw authored Oct 12, 2023
1 parent 8e6ee2b commit d8dbcbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lib/color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
################################################################################

# shellcheck disable=SC2034
if [[ ! -v COLOR_OPEN ]]; then
if [ -z "${COLOR_OPEN+x}" ]; then
COLOR_OPEN=1
fi

Expand Down

0 comments on commit d8dbcbb

Please sign in to comment.