We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96e0103 commit 02f24dfCopy full SHA for 02f24df
2 files changed
lib/commands/where.sh
@@ -32,7 +32,12 @@ where_command() {
32
echo "$install_path"
33
exit 0
34
else
35
- echo "Version not installed"
36
- exit 1
+ if [ "$version" = "system" ]; then
+ echo "System version is selected"
37
+ exit 1
38
+ else
39
+ echo "Version not installed"
40
41
+ fi
42
fi
43
}
test/where_command.bats
@@ -49,6 +49,12 @@ function teardown() {
49
[ "$output" = "Version not installed" ]
50
51
52
+@test "where should error when system version is set" {
53
+ run asdf where 'dummy' 'system'
54
+ [ "$status" -eq 1 ]
55
+ [ "$output" = "System version is selected" ]
56
+}
57
+
58
@test "where should error when no current version selected and version not specified" {
59
run asdf where 'dummy'
60
0 commit comments