eplace -v Operator to Ensure Compatibility (#1185)

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: https://github.com/openimsdk/open-im-server/issues/1182
This commit is contained in:
Xinwei Xiong
2023-10-12 10:45:41 +08:00
committed by GitHub
parent 8e6ee2b80f
commit d8dbcbbec6
+1 -1
View File
@@ -20,7 +20,7 @@
################################################################################
# shellcheck disable=SC2034
if [[ ! -v COLOR_OPEN ]]; then
if [ -z "${COLOR_OPEN+x}" ]; then
COLOR_OPEN=1
fi