Better method for string concatenation
Never developed in Ruby before. I have only just discovered that apparently `<<` is a better method of string concatenation.
This commit is contained in:
parent
2720ed3d2c
commit
d1be7ae84a
|
@ -4,7 +4,7 @@ module VagrantPlugins
|
||||||
class InsertPublicKey
|
class InsertPublicKey
|
||||||
def self.insert_public_key(machine, contents)
|
def self.insert_public_key(machine, contents)
|
||||||
comm = machine.communicate
|
comm = machine.communicate
|
||||||
contents = contents.chomp+"\n"
|
contents = contents.chomp << "\n"
|
||||||
|
|
||||||
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
|
remote_path = "/tmp/vagrant-authorized-keys-#{Time.now.to_i}"
|
||||||
Tempfile.open("vagrant-linux-insert-public-key") do |f|
|
Tempfile.open("vagrant-linux-insert-public-key") do |f|
|
||||||
|
|
Loading…
Reference in New Issue