Skip to content

Commit

Permalink
fix: Add lazy to regular expression.
Browse files Browse the repository at this point in the history
  • Loading branch information
gowizzard committed Dec 26, 2022
1 parent da48c91 commit da0b404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion import.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type data struct {
}

// regex is to save the compiled expression.
var regex = regexp.MustCompile(`(?m)(?P<key>\w+)=["']?(?P<value>.*)(?:["']|\b)$`)
var regex = regexp.MustCompile(`(?m)(?P<key>\w+?)=["']?(?P<value>.*?)(?:["']|\b)$`)

// Import is read the environment variable file and use regex to find
// all sub matches. After that we initialize the environment variables to local.
Expand Down

0 comments on commit da0b404

Please sign in to comment.