Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ func loadYamlModel(ctx context.Context, config types.ConfigDetails, opts *Option
if err == io.EOF {
break
}
if err != nil {
return nil, err
}
if err := processRawYaml(raw, processor); err != nil {
return nil, err
}
Expand Down
10 changes: 9 additions & 1 deletion loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,14 @@ services:
assert.DeepEqual(t, configWithoutEnvFiles.Services["web"].Environment, expectedEnvironmentMap)
}

func TestDecodeErrors(t *testing.T) {
dict := "name: test\nservices:\n web:\n image: nginx\n\tbuild: ."

configDetails := buildConfigDetails(dict, nil)
_, err := Load(configDetails)
assert.Error(t, err, "yaml: line 4: found a tab character that violates indentation")
}

func TestBuildProperties(t *testing.T) {
dict := `
name: test
Expand Down Expand Up @@ -2768,7 +2776,7 @@ services:
image: example/proxy
build: ./proxy
develop:
watch:
watch:
# rebuild image and recreate service
- path: ./proxy/proxy.conf
action: sync+restart
Expand Down