diff --git a/CHANGELOG.md b/CHANGELOG.md index fcdab34f14..67ba2129a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐Ÿ› Bug fixes +- Fixed EAS server environment variables does not pass to `npx expo-updates runtimeversion:resolve` call. ([#2867](https://github.com/expo/eas-cli/pull/2867) by [@kudo](https://github.com/kudo)) + ### ๐Ÿงน Chores ## [15.0.0](https://github.com/expo/eas-cli/releases/tag/v15.0.0) - 2025-02-04 diff --git a/packages/eas-cli/src/commands/update/index.ts b/packages/eas-cli/src/commands/update/index.ts index 581f5ae189..d91788b650 100644 --- a/packages/eas-cli/src/commands/update/index.ts +++ b/packages/eas-cli/src/commands/update/index.ts @@ -237,6 +237,10 @@ export default class UpdatePublish extends EasCommand { jsonFlag, }); + const maybeServerEnv = environment + ? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' } + : {}; + // build bundle and upload assets for a new publish if (!skipBundler) { const bundleSpinner = ora().start('Exporting...'); @@ -247,11 +251,7 @@ export default class UpdatePublish extends EasCommand { exp, platformFlag: requestedPlatform, clearCache, - extraEnv: { - ...(environment - ? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' } - : {}), - }, + extraEnv: maybeServerEnv, }); bundleSpinner.succeed('Exported bundle(s)'); } catch (e) { @@ -393,7 +393,7 @@ export default class UpdatePublish extends EasCommand { ...workflows, web: Workflow.UNKNOWN, }, - env: undefined, + env: maybeServerEnv, }); const runtimeToPlatformsAndFingerprintInfoMapping = getRuntimeToPlatformsAndFingerprintInfoMappingFromRuntimeVersionInfoObjects(