Skip to content
Closed
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
2 changes: 1 addition & 1 deletion interpolation/interpolation.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func recursiveInterpolate(value interface{}, path Path, opts Options) (interface
switch value := value.(type) {
case string:
newValue, err := opts.Substitute(value, template.Mapping(opts.LookupValue))
if err != nil || newValue == value {
if err != nil {
return value, newPathError(path, err)
}
caster, ok := opts.getCasterForPath(path)
Expand Down
11 changes: 11 additions & 0 deletions loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2126,6 +2126,17 @@ services:
assert.ErrorContains(t, err, "services.test.build.ssh must be a mapping")
}

func TestLoadLegacyBoolean(t *testing.T) {
actual, err := loadYAML(`
name: load-legacy-boolean
services:
test:
init: yes # used to be a valid YAML bool, removed in YAML 1.2
`)
assert.NilError(t, err)
assert.Check(t, *actual.Services[0].Init)
}

func TestLoadSSHWithDefaultValueInBuildConfig(t *testing.T) {
actual, err := loadYAML(`
name: load-ssh-with-default-value-in-build-config
Expand Down