Method: Fastlane::CLIToolsDistributor.load_dot_env
- Defined in:
- fastlane/lib/fastlane/cli_tools_distributor.rb
.load_dot_env ⇒ Object
Since loading dotenv should respect additional environments passed using –env, we must extract the arguments out of ARGV and process them before calling into commander. This is required since the ENV must be configured before running any other commands in order to correctly respect variables like FASTLANE_HIDE_CHANGELOG and FASTLANE_DISABLE_COLORS
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'fastlane/lib/fastlane/cli_tools_distributor.rb', line 138 def load_dot_env env_cl_param = lambda do index = ARGV.index("--env") return nil if index.nil? ARGV.delete_at(index) return nil if ARGV[index].nil? value = ARGV[index] ARGV.delete_at(index) value end require 'fastlane/helper/dotenv_helper' Fastlane::Helper::DotenvHelper.load_dot_env(env_cl_param.call) end |