Skip to content

Commit

Permalink
Fix to the env var escaping (#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Suderman authored Apr 8, 2022
1 parent e8d6d0d commit a163b28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/course/course.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ func parseSecrets(courseData []byte) error {
func parseEnv(data string) (string, error) {
dataWithEnv := os.Expand(data, func(key string) string {
if key == "$" {
return "$$"
return "$"
}
if value, ok := os.LookupEnv(key); ok {
return value
Expand Down
2 changes: 1 addition & 1 deletion pkg/course/course_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func Test_parseEnv(t *testing.T) {
{
name: "escaping test",
data: "$$TEST_ENV_KEY",
want: "$$TEST_ENV_KEY",
want: "$TEST_ENV_KEY",
envMap: map[string]string{
"TEST_ENV_KEY": "test-env-value",
},
Expand Down

0 comments on commit a163b28

Please sign in to comment.