From 2318d8000bde6cac7352285f0f61488724369c05 Mon Sep 17 00:00:00 2001 From: Daniel Winkler Date: Fri, 27 Sep 2019 14:30:21 +0200 Subject: [PATCH] Update ReadDotEnv.rb Fix to allow spaces in .env file --- ios/ReactNativeConfig/ReadDotEnv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ReactNativeConfig/ReadDotEnv.rb b/ios/ReactNativeConfig/ReadDotEnv.rb index 96e3e2a3..41f3347f 100755 --- a/ios/ReactNativeConfig/ReadDotEnv.rb +++ b/ios/ReactNativeConfig/ReadDotEnv.rb @@ -22,7 +22,7 @@ def read_dot_env(envs_root) dotenv = begin # https://regex101.com/r/cbm5Tp/1 - dotenv_pattern = /^(?:export\s+|)(?[[:alnum:]_]+)=((?["'])?(?.*?[^\\])\k?|)$/ + dotenv_pattern = /^(?:export\s+|)(?[[:alnum:]_]+)\s*=\s*((?["'])?(?.*?[^\\])\k?|)$/ path = File.expand_path(File.join(envs_root, file.to_s)) if File.exist?(path)