Open panzi opened 2 months ago
If the inheritance syntax is used the line number isn't incremented.
Meaning, if rune == '\n' here, then p.line needs to be incremented: https://github.com/compose-spec/compose-go/blob/9d0d133e13d0955e27520c6317d08822b7c5de5f/dotenv/parser.go#L120
rune == '\n'
p.line
I'd add that before the successful return at the end of the function, so that if an error is reported it points at the correct line:
if inherited { p.line++ } return key, cutset, inherited, nil }
Would you offer us a PR to get this fixed ?
If the inheritance syntax is used the line number isn't incremented.
Meaning, if
rune == '\n'
here, thenp.line
needs to be incremented: https://github.com/compose-spec/compose-go/blob/9d0d133e13d0955e27520c6317d08822b7c5de5f/dotenv/parser.go#L120I'd add that before the successful return at the end of the function, so that if an error is reported it points at the correct line: