Lines from conf files that are comments should not be passed to shell.Expand (#374)

This commit is contained in:
Frederik Ring
2024-02-23 17:53:04 +01:00
committed by GitHub
parent e8307a2b5b
commit 9b768c71e6
4 changed files with 25 additions and 0 deletions

View File

@@ -49,6 +49,15 @@ func TestSource(t *testing.T) {
"QUX": "yyy",
},
},
{
"comments",
"testdata/comments.env",
false,
map[string]string{
"BAR": "xxx",
"BAZ": "yyy",
},
},
}
os.Setenv("QUX", "yyy")