a8m / envsubst

Environment variables substitution for Go
MIT License
747 stars 83 forks source link

Add support for substitutions in the input file #44

Closed filip-zyzniewski closed 1 year ago

filip-zyzniewski commented 1 year ago

Expected:

~ $ go install github.com/a8m/envsubst/cmd/envsubst@latest
go: downloading github.com/a8m/envsubst v1.4.0
~ $ go/bin/envsubst <<EOF                      
FOO=1
BAR=\${FOO}
EOF
FOO=1
BAR=1
~ $

Got:

~ $ go install github.com/a8m/envsubst/cmd/envsubst@latest
go: downloading github.com/a8m/envsubst v1.4.0
~ $ go/bin/envsubst <<EOF                      
FOO=1
BAR=\${FOO}
EOF
FOO=1
BAR=
~ $
filip-zyzniewski commented 1 year ago

Sorry, this is a PEBKAC, I have mixed up the template file with the environment.