summaryrefslogtreecommitdiff
path: root/xmake/scripts
diff options
context:
space:
mode:
authorwanzzhehe <[email protected]>2024-05-16 17:38:47 +0800
committerwanzzhehe <[email protected]>2024-05-16 17:38:47 +0800
commitb3f9bd3dc137f44d84aafc7c28d8495ede9be580 (patch)
tree13087aef661da8f0961bcd27b6072be2e000d5cf /xmake/scripts
parentc98080e93f0005d3d4f00a22df8633afe2051c85 (diff)
Fix bug: can't add XMAKE_ROOTDIR to PATH
Diffstat (limited to 'xmake/scripts')
-rw-r--r--xmake/scripts/profile-unix.fish2
-rw-r--r--xmake/scripts/profile-unix.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/scripts/profile-unix.fish b/xmake/scripts/profile-unix.fish
index 4811a5f12..e89b1f5cc 100644
--- a/xmake/scripts/profile-unix.fish
+++ b/xmake/scripts/profile-unix.fish
@@ -19,7 +19,7 @@
#
# register PATH
-string match --regex --quiet "(^|:)$XMAKE_ROOTDIR(:|\$)" "$PATH" && \
+string match --regex --quiet "(^|:)$XMAKE_ROOTDIR(:|\$)" "$PATH" || \
export PATH="$XMAKE_ROOTDIR:$PATH"
# register environments
diff --git a/xmake/scripts/profile-unix.sh b/xmake/scripts/profile-unix.sh
index 93dd7157c..1f5b69d0c 100644
--- a/xmake/scripts/profile-unix.sh
+++ b/xmake/scripts/profile-unix.sh
@@ -19,7 +19,7 @@
#
# register PATH
-[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] && export PATH="$XMAKE_ROOTDIR:$PATH"
+[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] || export PATH="$XMAKE_ROOTDIR:$PATH"
# register completions
if [[ -n "$ZSH_VERSION" ]]; then