Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit 108a0a9

Browse files
committed
Fix empty ENVEXEC_SPEC_FILES case
1 parent 85cd066 commit 108a0a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/envexec/config.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ https://github.com/hypnoglow/envexec`
6767
}
6868

6969
func (c *Config) parseEnvironment() error {
70-
c.specs = strings.Split(os.Getenv("ENVEXEC_SPEC_FILES"), ",")
70+
specs := strings.TrimSpace(os.Getenv("ENVEXEC_SPEC_FILES"))
71+
if specs != "" {
72+
c.specs = strings.Split(specs, ",")
73+
}
7174
return nil
7275
}
7376

0 commit comments

Comments
 (0)