Change dotenv pattern to support lowercase and numbers. (#108)

This commit is contained in:
David Urbane 2017-05-02 18:27:11 -06:00 committed by Pedro Belo
parent 5803c20c51
commit 5cd47f9c1f
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ puts "Reading env from #{file}"
dotenv = begin
# https://regex101.com/r/SLdbes/1
dotenv_pattern = /^(?<key>[[:upper:]_]+)=((?<quote>["'])?(?<val>.*?[^\\])\k<quote>?|)$/
dotenv_pattern = /^(?<key>[[:alnum:]_]+)=((?<quote>["'])?(?<val>.*?[^\\])\k<quote>?|)$/
# find that above node_modules/react-native-config/ios/
raw = File.read(File.join(Dir.pwd, "../../../#{file}"))
raw.split("\n").inject({}) do |h, line|