Permalink
Browse files

allow definition name to contain plus

  • Loading branch information...
1 parent d93179e commit 4713972fe84ccf9c4fbfd201e7e0110d731d14b3 @mpapis committed Dec 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/veewee/provider/virtualbox/box/helper/status.rb
@@ -6,7 +6,7 @@ module BoxCommand
def exists?
command="#{@vboxcmd} list vms"
shell_results=shell_exec("#{command}",{:mute => true})
- exists=shell_results.stdout.split(/\n/).grep(/\"#{name}\"/).size!=0
+ exists=shell_results.stdout.split(/\n/).grep(/\"#{name.gsub(/\+/,'\\\+')}\"/).size!=0
env.logger.info("Vm exists? #{exists}")
return exists
@@ -15,7 +15,7 @@ def exists?
def running?
command="#{@vboxcmd} list runningvms"
shell_results=shell_exec("#{command}",{:mute => true})
- running=shell_results.stdout.split(/\n/).grep(/\"#{name}\"/).size!=0
+ running=shell_results.stdout.split(/\n/).grep(/\"#{name.gsub(/\+/,'\\\+')}\"/).size!=0
env.logger.info("Vm running? #{running}")
return running

0 comments on commit 4713972

Please sign in to comment.