diff --git a/lib/vmfloaty/ssh.rb b/lib/vmfloaty/ssh.rb index 5de4313..9adee9c 100644 --- a/lib/vmfloaty/ssh.rb +++ b/lib/vmfloaty/ssh.rb @@ -24,7 +24,7 @@ class Ssh response = Pooler.retrieve(verbose, os_types, token, url) raise "Could not get vm from vmpooler:\n #{response}" unless response['ok'] - user = host_os =~ /win/ ? 'Administrator' : 'root' + user = /win/.match?(host_os) ? 'Administrator' : 'root' hostname = "#{response[host_os]['hostname']}.#{response['domain']}" cmd = "#{ssh_path} #{user}@#{hostname}"