10000 Merge pull request #34 from d3m3vilurr/fix-33 · javanile/r@6fc4301 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6fc4301

Browse files
authored
Merge pull request sdepold#34 from d3m3vilurr/fix-33
rsvm.sh: Fix unable `rsvm use` on the zsh
2 parents 79e815c + 85c8d2f commit 6fc4301

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rsvm.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ RSVM_NORMAL_PATTERN="[0-9]+\.[0-9]+(\.[0-9]+)?(-(alpha|beta)(\.[0-9]*)?)?"
1010
RSVM_RC_PATTERN="$RSVM_NORMAL_PATTERN-rc(\.[0-9]+)?"
1111
RSVM_VERSION_PATTERN="($RSVM_NIGHTLY_PATTERN|$RSVM_NORMAL_PATTERN|$RSVM_RC_PATTERN|$RSVM_BETA_PATTERN)"
1212
RSVM_LAST_INSTALLED_VERSION=
13-
RSVM_SCRIPT=${BASH_SOURCE[0]}
13+
14+
if [ -n "$ZSH_VERSION" ]
15+
then
16+
RSVM_SCRIPT=${(%):-%N}
17+
RSVM_SCRIPT="$(cd -P "$(dirname "$RSVM_SCRIPT")" && pwd)/$(basename "$RSVM_SCRIPT")"
18+
else
19+
RSVM_SCRIPT=${BASH_SOURCE[0]}
20+
fi
1421

1522
RSVM_ARCH=`uname -m`
1623
RSVM_OSTYPE=`uname -s`

0 commit comments

Comments
 (0)
0