diff options
| author | Daniel Martí <mvdan@mvdan.cc> | 2018-06-29 16:59:04 +0100 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2018-06-29 21:07:28 +0000 |
| commit | a94a390e5cf802e54c95afb973c2f51be76f669e (patch) | |
| tree | a76851a3ebb780f0d058031db783abdd836572b9 /src/runtime/stack.go | |
| parent | a5f8128e39d081c972e7bf3182122bac79bb6f8c (diff) | |
| download | go-a94a390e5cf802e54c95afb973c2f51be76f669e.tar.xz | |
os: treat "${}" in Expand like in Go 1.10
CL 103055 made it so that invalid parameter expansions, like "$|", did
not make the dollar sign silently disappear.
A few edge cases were not taken into account, such as "${}" and "${",
which were now printing just "$". For consistency and to not break
existing programs, go back to eating up the characters when invalid
syntax is encountered.
For completeness, add a "$" test case too, even though its behavior is
unchanged by this CL.
Fixes #26135.
Change-Id: I5d25db9a8356dc6047a8502e318355113a99b247
Reviewed-on: https://go-review.googlesource.com/121636
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions
