bump compose-go version to v1.17.0 to fix issue with depends_on

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours
2023-07-27 10:35:12 +02:00
committed by CrazyMax
parent 50fbdd86f9
commit f3775c0046
31 changed files with 2317 additions and 352 deletions

View File

@ -123,8 +123,8 @@ loop:
}
return "", "", inherited, fmt.Errorf(
`line %d: unexpected character %q in variable name`,
p.line, string(rune))
`line %d: unexpected character %q in variable name %q`,
p.line, string(rune), strings.Split(src, "\n")[0])
}
}
@ -153,17 +153,24 @@ func (p *parser) extractVarValue(src string, envMap map[string]string, lookupFn
return retVal, rest, err
}
previousCharIsEscape := false
// lookup quoted string terminator
for i := 1; i < len(src); i++ {
if src[i] == '\n' {
p.line++
}
if char := src[i]; char != quote {
if !previousCharIsEscape && char == '\\' {
previousCharIsEscape = true
} else {
previousCharIsEscape = false
}
continue
}
// skip escaped quote symbol (\" or \', depends on quote)
if prevChar := src[i-1]; prevChar == '\\' {
if previousCharIsEscape {
previousCharIsEscape = false
continue
}