mirror of
https://github.com/status-im/react-native-config.git
synced 2026-08-30 22:21:13 +00:00
522: ignore empty lines and comments (#531)
This commit is contained in:
@@ -41,6 +41,9 @@ def read_dot_env(envs_root)
|
||||
raw.split("\n").inject({}) do |h, line|
|
||||
m = line.match(dotenv_pattern)
|
||||
|
||||
next h if line.nil? || line.strip.empty?
|
||||
next h if line.match(/^\s*#/)
|
||||
|
||||
if m.nil?
|
||||
abort('Invalid entry in .env file. Please verify your .env file is correctly formatted.')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user