From d6a22c9f88559f8f2d3a3cca0fe549f3c78ba814 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Thu, 13 Mar 2014 23:48:46 -0300 Subject: [PATCH] synced_folder: Warn in case `:group` or `:owner` are specified [GH-196] --- CHANGELOG.md | 4 +++- lib/vagrant-lxc/synced_folder.rb | 3 +++ locales/en.yml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c8667..fc0d131 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,12 +22,14 @@ IMPROVEMENTS: - Set container utsname to configured hostname by default [[GH-253]] - Added libvirt dnsmasq leases file to the lookup paths [[GH-251]] - - Acceptance specs are now powered by `vagrant-spec` [[GH-213]] - Improved compatibility with Vagrant 1.4 / 1.5 including the ability to use `rsync` and `nfs` shared folders to work around synced folders permission problems. More information can be found on the following issues: [[GH-151]] [[GH-191]] [[GH-241]] [[GH-242]] + - Warn in case `:group` or `:owner` are specified for synced folders [[GH-251]] + - Acceptance specs are now powered by `vagrant-spec` [[GH-213]] +[GH-196]: https://github.com/fgrehm/vagrant-lxc/issues/196 [GH-251]: https://github.com/fgrehm/vagrant-lxc/pull/251 [GH-253]: https://github.com/fgrehm/vagrant-lxc/pull/253 [GH-151]: https://github.com/fgrehm/vagrant-lxc/issues/151 diff --git a/lib/vagrant-lxc/synced_folder.rb b/lib/vagrant-lxc/synced_folder.rb index e61b5b1..ab543ee 100644 --- a/lib/vagrant-lxc/synced_folder.rb +++ b/lib/vagrant-lxc/synced_folder.rb @@ -13,6 +13,9 @@ module Vagrant host_path = Pathname.new(File.expand_path(data[:hostpath], machine.env.root_path)) guest_path = data[:guestpath] + env[:ui].warn(I18n.t("vagrant_lxc.messages.warn_owner")) if data[:owner] + env[:ui].warn(I18n.t("vagrant_lxc.messages.warn_group")) if data[:group] + if !host_path.directory? && data[:create] # Host path doesn't exist, so let's create it. @logger.info("Host path doesn't exist, creating: #{host_path}") diff --git a/locales/en.yml b/locales/en.yml index 7aec249..37c0188 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -16,6 +16,12 @@ en: Warning! The LXC provider doesn't support any of the Vagrant public / private network configurations (ex: `config.vm.network :private_network, ip: "some-ip"`). They will be silently ignored. + warn_group: |- + Warning! The LXC provider doesn't support the :group parameter for synced + folders. It will be silently ignored. + warn_owner: |- + Warning! The LXC provider doesn't support the :owner parameter for synced + folders. It will be silently ignored. vagrant: commands: