-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alias environment files not read on pre-deploy checks #7924
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Also happening on my end, my |
To add on here. It seems the build step for functions is not using any environment variables from the .env files inside ./functions -folder. This is blocking for us as we are getting the trigger instance for function from the env. Workaround currently is to check the variables also from the So in our helper function we use something similar to this:
|
Hi @eljass thanks for opening your first issue here! So looking at your setup, everything actually seems to be WAI. Standard env support with .env files are only available during the function runtime. That's inside the function only and not used as config during build-time. We developed params as the solution for folks that want to parametrize their configuration and use vars during both build and runtime. But it looks like the Thanks! |
[REQUIRED] Environment info
firebase-tools: 10.9.0
Platform: macOS
[REQUIRED] Test case
See below.
[REQUIRED] Steps to reproduce
Firebase aliases:
.env variables:
We have helper function that checks if the variable exists:
So it seems that the
process.env
is read from the.env
-file only, not from the aliased env like documentation states in here.I did try with adding the
dotenv
node module and usingdotenv.config()
but there was no changes there.[REQUIRED] Expected behavior
Pre deploy checks should respect named
.env
files and list the variables.[REQUIRED] Actual behavior
See above.
Final comment
We did got around this issue with the
CLOUD_RUNTIME_CONFIG
variable, which did included correct env variables. But I assume it is a deprecated variable thatruntimeconfig
sets. So if that is removed in the future, we will end up with the same block.The text was updated successfully, but these errors were encountered: