From 50c0c487fb798e2f5d105bb2e65a82168b1dc3c3 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sat, 30 May 2015 20:57:49 -0700 Subject: [PATCH] Style cleanup for new name option --- plugins/provisioners/shell/config.rb | 3 --- plugins/provisioners/shell/provisioner.rb | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/provisioners/shell/config.rb b/plugins/provisioners/shell/config.rb index 63f93deee..2f4957214 100644 --- a/plugins/provisioners/shell/config.rb +++ b/plugins/provisioners/shell/config.rb @@ -39,9 +39,6 @@ module VagrantPlugins if @args && args_valid? @args = @args.is_a?(Array) ? @args.map { |a| a.to_s } : @args.to_s end - if not(@name.nil?) and not(@name.is_a?(String)) - @name = nil - end end def validate(machine) diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb index e694d1c79..4ee302f5d 100644 --- a/plugins/provisioners/shell/provisioner.rb +++ b/plugins/provisioners/shell/provisioner.rb @@ -65,9 +65,9 @@ module VagrantPlugins comm.upload(path.to_s, config.upload_path) - if not(config.name.nil?) + if config.name @machine.ui.detail(I18n.t("vagrant.provisioners.shell.running", - script: "Name: #{config.name}")) + script: "script: #{config.name}")) elsif config.path @machine.ui.detail(I18n.t("vagrant.provisioners.shell.running", script: path.to_s)) @@ -125,9 +125,9 @@ module VagrantPlugins command = "powershell #{shell_args.to_s} -file #{command}" if File.extname(exec_path).downcase == '.ps1' - if not(config.name.nil?) + if config.name @machine.ui.detail(I18n.t("vagrant.provisioners.shell.running", - script: "Name: #{config.name}")) + script: "script: #{config.name}")) elsif config.path @machine.ui.detail(I18n.t("vagrant.provisioners.shell.runningas", local: config.path.to_s, remote: exec_path))