bitrise-steplib / steps-fastlane

MIT License
35 stars 19 forks source link

Fix fastlane command envs. #68

Closed godrei closed 3 years ago

godrei commented 3 years ago

Fixes the issue of setting FASTLANE_SESSION env var for the Fastlane command.

command.AppendEnvs was incorrectly used:

// AppendEnvs - appends the envs to the current os.Environ()
// Calling this multiple times will NOT appens the envs one by one,
// only the last "envs" set will be appended to os.Environ()!

Merge sample app PR first, it introduces a new lane for testing the presence of FASTLANE_SESSION.

If a session-based Apple Developer account not set the new test case fails with this message:


Run Fastlane
$ fastlane "test_fastlane_session"
[17:17:27]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[17:17:32]: ------------------------------
[17:17:32]: --- Step: default_platform ---
[17:17:32]: ------------------------------
[17:17:32]: Driving the lane 'ios test_fastlane_session' 🚀
[17:17:32]: ------------------------------------
[17:17:32]: --- Step: bash ./test_session.sh ---
[17:17:32]: ------------------------------------
[17:17:32]: $ bash ./test_session.sh
[17:17:32]: â–¸ FASTLANE_SESSION not set