Unset container name if docker_run is called. Fixes #4294

This commit is contained in:
Ray Clanan 2014-08-29 23:29:58 -04:00
parent c78b46dc7b
commit f1e730e9a1
1 changed files with 8 additions and 1 deletions

View File

@ -32,12 +32,19 @@ module VagrantPlugins
# Remove container after execution # Remove container after execution
params[:rm] = true if env[:run_rm] params[:rm] = true if env[:run_rm]
# Name should not be used with run_command
params[:name] = UNSET_VALUE
# We link to our original container # We link to our original container
# TODO # TODO
end end
env[:ui].output(I18n.t("docker_provider.creating")) env[:ui].output(I18n.t("docker_provider.creating"))
env[:ui].detail(" Name: #{params[:name]}")
if params[:name] != UNSET_VALUE
env[:ui].detail(" Name: #{params[:name]}")
end
env[:ui].detail(" Image: #{params[:image]}") env[:ui].detail(" Image: #{params[:image]}")
if params[:cmd] && !params[:cmd].empty? if params[:cmd] && !params[:cmd].empty?
env[:ui].detail(" Cmd: #{params[:cmd].join(" ")}") env[:ui].detail(" Cmd: #{params[:cmd].join(" ")}")