fix: allow vagrant up by name

This commit is contained in:
Quentin Dreyer 2019-11-07 10:20:22 +01:00 committed by GitHub
parent 7560c7fdef
commit f959ff93e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ module Vagrant
# @return [Hash]
def find_by_prefix(prefix)
@machines.each do |uuid, data|
return data.merge("id" => uuid) if uuid.start_with?(prefix)
return data.merge("id" => uuid) if uuid.start_with?(prefix) or data['name'] == prefix
end
nil