mirror of
https://github.com/status-im/react-native-config.git
synced 2025-02-28 15:00:45 +00:00
Update ReadDotEnv.rb
Fix to allow spaces in .env file
This commit is contained in:
parent
b1e18769b6
commit
2318d8000b
@ -22,7 +22,7 @@ def read_dot_env(envs_root)
|
||||
|
||||
dotenv = begin
|
||||
# https://regex101.com/r/cbm5Tp/1
|
||||
dotenv_pattern = /^(?:export\s+|)(?<key>[[:alnum:]_]+)=((?<quote>["'])?(?<val>.*?[^\\])\k<quote>?|)$/
|
||||
dotenv_pattern = /^(?:export\s+|)(?<key>[[:alnum:]_]+)\s*=\s*((?<quote>["'])?(?<val>.*?[^\\])\k<quote>?|)$/
|
||||
|
||||
path = File.expand_path(File.join(envs_root, file.to_s))
|
||||
if File.exist?(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user