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)
|
## 0.9.4 (unreleased)
|
||||||
|
|
||||||
|
- Match VM names that have parens, brackets, etc.
|
||||||
|
|
||||||
## 0.9.3 (January 24, 2012)
|
## 0.9.3 (January 24, 2012)
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
output = execute("list", "vms")
|
output = execute("list", "vms")
|
||||||
if output =~ /^"#{name}" \{(.+?)\}$/
|
if output =~ /^"#{Regexp.escape(name)}" \{(.+?)\}$/
|
||||||
return $1.to_s
|
return $1.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
output = execute("list", "vms")
|
output = execute("list", "vms")
|
||||||
if output =~ /^"#{name}" \{(.+?)\}$/
|
if output =~ /^"#{Regexp.escape(name)}" \{(.+?)\}$/
|
||||||
return $1.to_s
|
return $1.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue