Skip to content

Commit 22e9730

Browse files
committed
Fix which current not work error
Signed-off-by: ghosind <ghosind@gmail.com>
1 parent a644365 commit 22e9730

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

dvm.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,13 +2196,16 @@ dvm() {
21962196
"which")
21972197
shift
21982198

2199-
dvm_get_version "$@"
2200-
2201-
if [ -z "$DVM_TARGET_VERSION" ]
2199+
if [ "$#" = "0" ] || [ "$1" != "current" ]
22022200
then
2203-
dvm_print_help
2204-
dvm_failure
2205-
return
2201+
dvm_get_version "$@"
2202+
2203+
if [ -z "$DVM_TARGET_VERSION" ]
2204+
then
2205+
dvm_print_help
2206+
dvm_failure
2207+
return
2208+
fi
22062209
fi
22072210

22082211
dvm_locate_version "$@"

0 commit comments

Comments
 (0)