Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[expo-cli] consolidate env variables. #2358

Merged
merged 3 commits into from
Jul 15, 2020
Merged

[expo-cli] consolidate env variables. #2358

merged 3 commits into from
Jul 15, 2020

Conversation

jkhales
Copy link
Contributor

@jkhales jkhales commented Jul 14, 2020

This fixes #2280.

NB: in case of conflict we chose to prioritize the flag over the env variable.

Joint with @quinlanj

tests

  • manually tested expo upload:ios with flags and env var

@jkhales jkhales requested a review from cruzach July 14, 2020 20:16
@jkhales
Copy link
Contributor Author

jkhales commented Jul 14, 2020

Tests are failing but unrelated to our PR.

Copy link
Contributor

@cruzach cruzach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for taking care of this one 🙏
Since we were prioritizing the environment variable over the flag before, and now we're doing the opposite, this still might constitute a breaking change (although I do agree that if both are provided, it seems intuitive to fallback to whatever was provided by the flag).

We could keep the original behavior, but if you provide both and they aren't equal, we log an error? something like

You've provided contradictory Apple IDs. You should provide either [env var] or [flag], not both. Falling back to [whichever we fall back to].

unrelated- we'll need to update the docs as well

@jkhales
Copy link
Contributor Author

jkhales commented Jul 14, 2020

You've provided contradictory Apple IDs. You should provide either [env var] or [flag], not both. Falling back to [whichever we fall back to].

Thanks for catching the missing docs, updated!
Warnings are a nice touch, added.

Regarding the breaking behavior, we had discussed this and think that this is the intuitive behavior and further this happens only when a user is doing multiple things wrong so we felt comfortable moving ahead with it.

@jkhales jkhales requested a review from cruzach July 14, 2020 21:27
Copy link
Contributor

@cruzach cruzach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one typo fix

this happens only when a user is doing multiple things wrong

I wouldn't say passing both the flag and the env variable is necessarily wrong, but if we are changing this then might as well add a changelog entry listing this as a bug fix so it's easily identifiable for that extremely rare case where someone maybe was relying on this behavior

packages/expo-cli/src/commands/upload/IOSUploader.ts Outdated Show resolved Hide resolved
Co-authored-by: Charlie Cruzan <35579283+cruzach@users.noreply.github.com>
@jkhales jkhales merged commit 05a88e6 into master Jul 15, 2020
@jkhales jkhales deleted the @jkhales/bug-bash branch July 15, 2020 12:41
@jkhales
Copy link
Contributor Author

jkhales commented Jul 15, 2020

just one typo fix

this happens only when a user is doing multiple things wrong

I wouldn't say passing both the flag and the env variable is necessarily wrong, but if we are changing this then might as well add a changelog entry listing this as a bug fix so it's easily identifiable for that extremely rare case where someone maybe was relying on this behavior

b245cf5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IOS build and upload commands should rely on the same env vars
2 participants