Support pushing existing secret and sensitive variables
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
forceflag has been added. - If a variable from the
.envfile is already present ineas, itsvisibilityandenvironmentsare preserved.
Test Plan
Tested manually