Change dotenv pattern to support lowercase and numbers. (#108)
This commit is contained in:
parent
5803c20c51
commit
5cd47f9c1f
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue