as `key` is a file path, it must be quoted

This commit is contained in:
Tomoyuki Sakurai 2016-10-04 21:37:30 +09:00 committed by Brian Cain
parent c9577d5967
commit a76dfc7b37
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ module VagrantPlugins
# Multiple Private Keys
unless !config.inventory_path && @ssh_info[:private_key_path].size == 1
@ssh_info[:private_key_path].each do |key|
ssh_options << "-o IdentityFile=%s" % [ key.gsub('%', '%%') ]
ssh_options << "-o 'IdentityFile=%s'" % [ key.gsub('%', '%%') ]
end
end