eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

Support pushing existing secret and sensitive variables

Open khamilowicz opened this issue 1 year ago • 8 comments

Why

ENG-14486: Support updating secret variables with eas env:push

https://github.com/expo/eas-cli/issues/2753

Currently, we don't support adding secrets using the eas env:push command. However, this behavior conflicts with the legacy eas secrets:push command, forcing some users to either convert their secrets to public variables or prefix them with EXPO_SENSITIVE. This pull request addresses this issue by enabling users to update existing secret or sensitive variables without any additional work.

Additionally, the --force option has been added to skip prompts.

Also, an unintended behavior has been fixed: pushing variables would overwrite the existing environments field of eas variables instead of appending to it. If a user has defined a variable in multiple environments and then pushes it to just one, the variable will only be linked to that specific environment.

How

  • A boolean force flag has been added.
  • If a variable from the .env file is already present in eas, its visibility and environments are preserved.

Test Plan

Tested manually

khamilowicz avatar Dec 12 '24 15:12 khamilowicz