Regexp escape VM names when matching for them.
This commit is contained in:
parent
0dbd012d6b
commit
f48a2784a0
|
@ -1,6 +1,6 @@
|
|||
## 0.9.4 (unreleased)
|
||||
|
||||
|
||||
- Match VM names that have parens, brackets, etc.
|
||||
|
||||
## 0.9.3 (January 24, 2012)
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
output = execute("list", "vms")
|
||||
if output =~ /^"#{name}" \{(.+?)\}$/
|
||||
if output =~ /^"#{Regexp.escape(name)}" \{(.+?)\}$/
|
||||
return $1.to_s
|
||||
end
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
output = execute("list", "vms")
|
||||
if output =~ /^"#{name}" \{(.+?)\}$/
|
||||
if output =~ /^"#{Regexp.escape(name)}" \{(.+?)\}$/
|
||||
return $1.to_s
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue