diff --git a/examples/examples_yaml_test.go b/examples/examples_yaml_test.go index b986b7d1..581400cd 100644 --- a/examples/examples_yaml_test.go +++ b/examples/examples_yaml_test.go @@ -96,7 +96,7 @@ func TestBuildOnPreviewYAML(t *testing.T) { }) } -func TestUnknownsBuildOnPreviewFailsYAML(t *testing.T) { +func TestUnknownsBuildOnPreviewWarnsYAML(t *testing.T) { cwd, err := os.Getwd() if !assert.NoError(t, err) { t.FailNow() diff --git a/provider/provider.go b/provider/provider.go index 606214a7..08cc9ce4 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -738,10 +738,10 @@ func marshalBuildOnPreview(inputs resource.PropertyMap) bool { func ensureMinimumBuildInputs(inputs resource.PropertyMap) bool { if !inputs["build"].IsObject() { return false - } else { - if inputs["build"].ObjectValue()["dockerfile"].ContainsUnknowns() || inputs["build"].ObjectValue()["context"].ContainsUnknowns() { - return false - } + } + if inputs["build"].ObjectValue()["dockerfile"].ContainsUnknowns() || + inputs["build"].ObjectValue()["context"].ContainsUnknowns() { + return false } if inputs["imageName"].ContainsUnknowns() { return false