Fixed extra CR appended to create_directories dir list

This commit is contained in:
Zhongcheng Lao 2019-06-24 15:04:35 +08:00
parent 0aa034e870
commit d7456413ff
2 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ module VagrantPlugins
remote_fn = create_tmp_path(machine, {})
tmp = Tempfile.new('hv_dirs')
begin
tmp.binmode
tmp.write dirs.join("\n") + "\n"
tmp.close
machine.communicate.upload(tmp.path, remote_fn)

View File

@ -135,6 +135,7 @@ describe "VagrantPlugins::GuestLinux::Cap::FileSystem" do
context "passes directories to be create" do
let(:temp_file) do
double("temp_file").tap do |temp_file|
allow(temp_file).to receive(:binmode)
allow(temp_file).to receive(:close)
allow(temp_file).to receive(:path).and_return("temp_path")
allow(temp_file).to receive(:unlink)