Use strip instead of chomp
This commit is contained in:
parent
23b34bb6c0
commit
add40534de
|
@ -6,7 +6,7 @@ module VagrantPlugins
|
|||
class InsertPublicKey
|
||||
def self.insert_public_key(machine, contents)
|
||||
comm = machine.communicate
|
||||
contents = contents.chomp
|
||||
contents = contents.strip << "\n"
|
||||
|
||||
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
|
||||
Tempfile.open("vagrant-darwin-insert-public-key") do |f|
|
||||
|
|
|
@ -6,7 +6,7 @@ module VagrantPlugins
|
|||
class InsertPublicKey
|
||||
def self.insert_public_key(machine, contents)
|
||||
comm = machine.communicate
|
||||
contents = contents.chomp
|
||||
contents = contents.strip << "\n"
|
||||
|
||||
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
|
||||
Tempfile.open("vagrant-freebsd-insert-public-key") do |f|
|
||||
|
|
|
@ -4,7 +4,7 @@ module VagrantPlugins
|
|||
class InsertPublicKey
|
||||
def self.insert_public_key(machine, contents)
|
||||
comm = machine.communicate
|
||||
contents = contents.chomp << "\n"
|
||||
contents = contents.strip << "\n"
|
||||
|
||||
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
|
||||
Tempfile.open("vagrant-linux-insert-public-key") do |f|
|
||||
|
|
Loading…
Reference in New Issue