From 64de0fca3c14efb061ddb3904721db5f23d5d66f Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 21 Mar 2014 19:53:49 -0300 Subject: [PATCH] command/sudoers: Mention what is the default value for the user and add a REFACTOR note --- lib/vagrant-lxc/command/sudoers.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/command/sudoers.rb b/lib/vagrant-lxc/command/sudoers.rb index 484a430..a17cf7c 100644 --- a/lib/vagrant-lxc/command/sudoers.rb +++ b/lib/vagrant-lxc/command/sudoers.rb @@ -11,8 +11,8 @@ module Vagrant opts = OptionParser.new do |opts| opts.banner = "Usage: vagrant lxc sudoers" opts.separator "" - opts.on('-u', '--user', "The user for which to create the policy") do |u| - options[:user]=u + opts.on('-u', '--user', "The user for which to create the policy (defaults to '#{options[:user]}')") do |u| + options[:user] = u end end @@ -24,6 +24,9 @@ module Vagrant end private + + # REFACTOR: Make use ERB rendering after https://github.com/mitchellh/vagrant/issues/3231 + # lands into core def create_tempfile!(user, filename) sudoers = Tempfile.new(filename).tap do |file| file.write "# Automatically created by vagrant-lxc\n"