Skip to content

Commit b3f9bd3

Browse files
committed
Fix bug: can't add XMAKE_ROOTDIR to PATH
1 parent c98080e commit b3f9bd3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

scripts/get.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ fi
237237
#
238238
install_profile() {
239239
export XMAKE_ROOTDIR="$prefix/bin"
240-
[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] && export PATH="$XMAKE_ROOTDIR:$PATH"
240+
[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] || export PATH="$XMAKE_ROOTDIR:$PATH"
241241
xmake --version
242242
xmake update --integrate
243243
}

xmake/scripts/profile-unix.fish

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020

2121
# register PATH
22-
string match --regex --quiet "(^|:)$XMAKE_ROOTDIR(:|\$)" "$PATH" && \
22+
string match --regex --quiet "(^|:)$XMAKE_ROOTDIR(:|\$)" "$PATH" || \
2323
export PATH="$XMAKE_ROOTDIR:$PATH"
2424

2525
# register environments

xmake/scripts/profile-unix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020

2121
# register PATH
22-
[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] && export PATH="$XMAKE_ROOTDIR:$PATH"
22+
[[ "$PATH" =~ (^|:)"$XMAKE_ROOTDIR"(:|$) ]] || export PATH="$XMAKE_ROOTDIR:$PATH"
2323

2424
# register completions
2525
if [[ -n "$ZSH_VERSION" ]]; then

0 commit comments

Comments
 (0)