a8m / envsubst

Environment variables substitution for Go
MIT License
761 stars 82 forks source link

Regression for single-letter variables surrounded with curly braces #43

Closed qbarrand closed 1 year ago

qbarrand commented 1 year ago

We observe that the A=AAA replacement does not work with ${A} in 1.4.0. $A does work, and so does $BB / ${BB} with BB=BBB.

Reproduction in the Go playground: https://go.dev/play/p/aU2K_t0SrZz

a8m commented 1 year ago

Thanks for reporting this, @qbarrand. I'll give this a look

neiser commented 1 year ago

@a8m Oh, probably introduced by my change in the lexer? Let me have a quick look!

a8m commented 1 year ago

@a8m Oh, probably introduced by my change in the lexer? Let me have a quick look!

Maybe. Give it a look, please? Thanks

neiser commented 1 year ago

@a8m See #45 Includes a reproducer test case which is fixed by the change.

neiser commented 1 year ago

@qbarrand Thanks for reporting and also sorry for causing that trouble. Removed one bug, introduced another :see_no_evil:

qbarrand commented 1 year ago

@neiser the quick fix much appreciated. Thank you both!

a8m commented 1 year ago

Thanks for reporting this, @qbarrand 🙏