mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-12 14:37:08 +08:00
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:

committed by
CrazyMax

parent
50fbdd86f9
commit
f3775c0046
13
vendor/github.com/compose-spec/compose-go/dotenv/parser.go
generated
vendored
13
vendor/github.com/compose-spec/compose-go/dotenv/parser.go
generated
vendored
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user