From 9c23e4d9cb1a84c098d6d6f29ad6d2e6f628fd78 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 22 Oct 2014 11:02:26 -0700 Subject: [PATCH] providers/docker: expand vagrant_vagrantfile [GH-4000] --- CHANGELOG.md | 1 + plugins/providers/docker/provider.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f6ed6771..0e1cb53dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ BUG FIXES: - providers/docker: Read the created container ID more robustly. - providers/docker: `vagrant share` uses correct IP of proxy VM if it exists. [GH-4342] + - providers/docker: `vagrant\_vagrantfile` expands home directory. [GH-4000] - providers/virtualbox: Show a human-friendly error if VirtualBox didn't clean up an existing VM. [GH-4681] - provisioners/docker: Search for docker binary in multiple places. [GH-4580] diff --git a/plugins/providers/docker/provider.rb b/plugins/providers/docker/provider.rb index 28d5b9967..7bdb200dd 100644 --- a/plugins/providers/docker/provider.rb +++ b/plugins/providers/docker/provider.rb @@ -73,6 +73,10 @@ module VagrantPlugins host_machine_name = :default end + # Expand it so that the home directories and so on get processed + # properly. + vf_path = File.expand_path(vf_path, @machine.env.root_path) + vf_file = File.basename(vf_path) vf_path = File.dirname(vf_path)