Fixup docker config update
This commit is contained in:
parent
29128e73b9
commit
4612619dc4
|
@ -297,9 +297,8 @@ module VagrantPlugins
|
||||||
def validate(machine)
|
def validate(machine)
|
||||||
errors = _detected_errors
|
errors = _detected_errors
|
||||||
|
|
||||||
# FIXME: is there a more ruby-elegant way to write this?
|
if [@build_dir, @git_repo, @image].compact.size > 1
|
||||||
if (@build_dir? 1 : 0) + (@git_repo? 1 : 0) + (@image? 1 : 0) > 1
|
errors << I18n.t("docker_provider.errors.config.both_build_and_image_and_git")
|
||||||
errors << I18n.t("docker_provider.errors.config.both_build_and_image")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if !@build_dir && !@git_repo && !@image
|
if !@build_dir && !@git_repo && !@image
|
||||||
|
|
|
@ -141,7 +141,7 @@ en:
|
||||||
and notify them to not use this communicator for anything except the
|
and notify them to not use this communicator for anything except the
|
||||||
"docker" provider.
|
"docker" provider.
|
||||||
config:
|
config:
|
||||||
both_build_and_image: |-
|
both_build_and_image_and_git: |-
|
||||||
Only one of "build_dir", "git_repo" or "image" can be set
|
Only one of "build_dir", "git_repo" or "image" can be set
|
||||||
build_dir_invalid: |-
|
build_dir_invalid: |-
|
||||||
"build_dir" must exist and contain a Dockerfile
|
"build_dir" must exist and contain a Dockerfile
|
||||||
|
|
Loading…
Reference in New Issue