Skip to content

Commit

Permalink
close #35 Merge branch 'tibers-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sami Alajrami committed Jun 5, 2018
2 parents 4c7dd44 + dad1105 commit ff78066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions state.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ func (s state) validate() (bool, string) {
// if the env variable is empty or unset, an empty string is returned
// if the string does not start with '$', it is returned as is.
func subsituteEnv(name string) string {
if strings.HasPrefix(name, "$") {
return os.Getenv(strings.SplitAfterN(name, "$", 2)[1])
if strings.Contains(name, "$") {
return os.ExpandEnv(name)
}
return name
}
Expand Down

0 comments on commit ff78066

Please sign in to comment.