Skip to content

Remove backported os.Expand() implementation

As discussed in !1677 (comment 250616894), we've backported os.Expand() from Go v1.10.8 in common/legacy_expand.go and common/legacy_expand_test.go so that we can upgrade Go compilers without introducing breaking changes.

Go v1.11+ changed the behavior in https://github.com/golang/go/commit/7bf631e1fc55839a6bff404a91597326e1addc10#diff-b30ffd1cf7612ccebac97fced83d5106 so that $ isn't gobbled unless the value is a valid shell variable (e.g. $FOOBAR, ${FOOBAR}).

In GitLab Runner v13.0, we should go back to using os.Expand() and remove these files.