title: Use fastlane supply with dotenv
body: <h3>Context &amp; example configuration</h3>
  
  <p>In order to set up fastlane for the first time in a project, I define different <strong>.env</strong> files, which I'd like to use with dotenv as described in <a href="https://github.com/fastlane/fastlane/blob/master/fastlane/docs/FAQs.md#multiple-targets-of-the-same-underlying-app" rel="nofollow noreferrer">in fastlane's FAQ</a>.</p>
  
  <p>Example <strong>.env.dev</strong> file:</p>
  
  <pre><code>JSON_KEY_FILE="/home/sam/.keys/googleplay/magnet.json"
  </code></pre>
  
  <p>In my <strong>Appfile</strong> I reference it using <strong>ENV</strong>, as suggested in <a href="https://stackoverflow.com/a/37329477">this</a> and <a href="https://stackoverflow.com/a/38261924">this</a> Stack Overflow answers:</p>
  
  <pre><code># Path to Google Developer Console key
  json_key_file ENV["JSON_KEY_FILE"]
  
  # Package name of the project. If not included in the environment, default value is used.
  package_name ENV["PACKAGE_NAME"] || cl.magnet.androidfastlanetest
  </code></pre>
  
  <p><br></p>
  
  <h3>My problem</h3>
  
  <p>I can't get past the <a href="https://docs.fastlane.tools/getting-started/android/setup/#fetch-your-app-metadata" rel="nofollow noreferrer">"Fetch your app metadata" step of fastlane's setup</a>, as I get an error when running <code>fastlane supply init</code> with the <code>--env</code> option:</p>
  
  <pre><code>~/repos/android-fastlane-test|master⚡ ⇒ fastlane supply init --env dev
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x005560049ed220&gt;
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x005560049e2eb0&gt;
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x005560055588f8&gt;
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x005560055368c0&gt;
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x0055600551a698&gt;
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x005560054fe6f0&gt;
  undefined local variable or method `cl' for #&lt;CredentialsManager::AppfileConfig:0x005560054e6b18&gt;
  invalid option: --env
  </code></pre>
  
  <p><br>
  What am I doing wrong? Given that I need to keep the path to <code>JSON_KEY_FILE</code> not in <strong>Appconfig</strong>, but in a separate file, what should I do?</p>