waEnsureOnPathFix

This commit is contained in:
starbr3aker 2025-01-15 22:58:37 +05:30
parent 6c3d582406
commit ad443a5a97

View File

@ -1653,7 +1653,7 @@ function waInstall() {
# Name: 'waEnsureOnPath'
# Role: Ensures that $BIN_PATH is on $PATH.
function waEnsureOnPath() {
if [[ ":$PATH:" == *":$BIN_PATH:"* ]]; then
if [[ !":$PATH:" =~ *":?$BIN_PATH:?"* ]]; then
echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} It seems like '${BIN_PATH}' is not on PATH."
echo -e "${WARNING_TEXT}[WARNING]${CLEAR_TEXT} You can add it by running:"
# shellcheck disable=SC2086