Skip to content

fix: determine the correct environment variables#6892

Open
petervmeijgaard wants to merge 2 commits intonetlify:mainfrom
petervmeijgaard:fix/correctly-determine-environment-variables
Open

fix: determine the correct environment variables#6892
petervmeijgaard wants to merge 2 commits intonetlify:mainfrom
petervmeijgaard:fix/correctly-determine-environment-variables

Conversation

@petervmeijgaard
Copy link

@petervmeijgaard petervmeijgaard commented Jan 23, 2026

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes #6891

When creating a new build using the Netlify CLI for a specific branch deploy, it will fail to fetch the correct environment variables and will result in a broken build.

Instead of fetching for a specific context, this fix will make sure that all environment variables are fetched first. Next, it will determine the ones to use.


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

image

When creating a new build using the Netlify CLI for a specific branch deploy, it will fail to fetch the correct
environment variables and will result in a broken build. Instead of fetching for a specific context, it will fetch all
environment variables and determine which ones to use later.
@petervmeijgaard petervmeijgaard requested a review from a team as a code owner January 23, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment variables aren't injected properly for specific branch deploys

1 participant