mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Fix local command bug.
This commit is contained in:
parent
dbbb0a5b7c
commit
61e014a2d6
@ -66,6 +66,10 @@ version_command() {
|
||||
|
||||
local version=$3
|
||||
|
||||
if [ $cmd = "local" ]; then
|
||||
file=$(pwd)/.tool-versions
|
||||
fi
|
||||
|
||||
check_if_version_exists $plugin $version
|
||||
|
||||
if [ -f $file ] && grep $plugin $file > /dev/null; then
|
||||
|
@ -67,6 +67,16 @@ teardown() {
|
||||
run local_command bar
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "1.0.0" ]
|
||||
|
||||
rm .tool-versions
|
||||
run local_command foo 1.2.0
|
||||
[ -f .tool-versions ]
|
||||
|
||||
run local_command foo
|
||||
[ "$status" -eq 0 ]
|
||||
[ "$output" = "1.2.0" ]
|
||||
run global_command foo
|
||||
[ "$output" = "1.0.0" ]
|
||||
}
|
||||
|
||||
@test "local should fallback to legacy-file when enabled" {
|
||||
|
Loading…
Reference in New Issue
Block a user