-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Build Error - Please verify your .env file is correctly formatted. #522
Comments
One issue at my setup has been, that On quick solution is to remove those. I patched the part of raw.split("\n").each_with_index.inject({}) do |h, line_pair|
line, index = line_pair
next h if line.nil? || line == '' || line == ' '
next h unless line.match(comment_line_pattern).nil?
m = line.match(dotenv_pattern)
if m.nil?
abort("Invalid entry in .env file. Please verify your .env file is correctly formatted (line: #{index + 1}, value: #{line}).")
end
key = m[:key]
# 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)
end It ignores comments and empty lines. |
So can you show me |
I also have comments in my .env files, so I updated it with this (same as @shllg's, but without the separate comment_line_pattern var): raw.split("\n").each_with_index.inject({}) do |h, line_pair|
line, index = line_pair
next h if line.nil? || line == '' || line == ' '
next h if line.match(/^\s*#/)
m = line.match(dotenv_pattern)
if m.nil?
abort("Invalid entry in .env file. Please verify your .env file is correctly formatted (line: #{index + 1}, value: #{line}).")
end
key = m[:key]
# 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)
end |
I have the same issue. never happened before. remove and pod install again. my .env file does not have invalid entries. no clue what's happening |
1.4.0 is free of this error. Downgrade to 1.4.0 |
@josevalb Even .env file is valid still it won't take other .env files apart from .env.dev. I have fixed this issue already raised a pr. #539 |
Looks like it was fixed in v 1.4.2 |
I git this error after installing pod and run from xcode
Invalid entry in .env file. Please verify your .env file is correctly formatted.
The text was updated successfully, but these errors were encountered: