From 8dbf33c4f1dacb2c6208671feac6f0e87c4ede06 Mon Sep 17 00:00:00 2001 From: Stefano Formicola Date: Wed, 24 May 2023 15:17:35 +0000 Subject: [PATCH] feat: add support for iOS specific envs Variables whose key start with `IOS_` are rewritten without the platform prefix --- 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 6f809140..8b119d22 100755 --- a/ios/ReactNativeConfig/ReadDotEnv.rb +++ b/ios/ReactNativeConfig/ReadDotEnv.rb @@ -48,7 +48,7 @@ def read_dot_env(envs_root) abort('Invalid entry in .env file. Please verify your .env file is correctly formatted.') end - key = m[:key] + key = m[:key].sub(/^IOS_/, '') # Ensure string (in case of empty value) and escape any quotes present in the value. val = m[:val].to_s.gsub('"', '\"') h.merge(key => val)