Values without a backing env var should not be expanded (#368)

* Values without a backing env var should not be expanded

* Add unit tests for sourcing behavior

* Replace godotenv with shell lib
This commit is contained in:
Frederik Ring
2024-02-21 17:44:37 +01:00
committed by GitHub
parent f64aaa6e24
commit 911fc5a223
10 changed files with 123 additions and 10 deletions

3
cmd/backup/testdata/braces.env vendored Normal file
View File

@@ -0,0 +1,3 @@
FOO=${bar:-qux}
BAR=xxx
BAZ=$NOPE

2
cmd/backup/testdata/default.env vendored Normal file
View File

@@ -0,0 +1,2 @@
FOO=bar
BAZ=qux

4
cmd/backup/testdata/expansion.env vendored Normal file
View File

@@ -0,0 +1,4 @@
BAR=xxx
FOO=${BAR}
BAZ=$BAR
QUX=${QUX}