Skip to content
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

.env variables are not automatically updated when used in the environments settings #4115

Closed
3 of 4 tasks
giovesoft opened this issue Feb 26, 2025 · 3 comments
Closed
3 of 4 tasks
Assignees
Labels
bug Something isn't working

Comments

@giovesoft
Copy link

I have checked the following:

  • I have searched existing issues and found nothing related to my issue.

This bug is:

  • making Bruno unusable for me
  • slowing me down but I'm able to continue working
  • annoying

Bruno version

1.39.1

Operating System

macos 15.3

Describe the bug

Many times I have to update my .env for various reasons...
It would be great to have a "reload .env" button or an automatic .env reload to not close and reopen Bruno to do that.
The reload is working only by referring the .env property directly but not if it is referred in a environment variable.

If you define the property in the environment (top right dropdown combo) it is not refreshing when changed in the .env file.
e.g.
this is defined in the DEV env
x_api_key={{process.env.DEV_X_API_KEY}}

this is defined in the STAGING env
x_api_key={{process.env.STAGING_X_API_KEY}}

DEV_X_API_KEY and STAGING_X_API_KEY are defined in the .env file as

DEV_X_API_KEY=1
STAGING_X_API_KEY=2

if you change DEV_X_API_KEY=1 to DEV_X_API_KEY=A the change is not reflected automatically in Bruno.
Sometime it works by selecting different environments in the top right dropdown, sometime changing the collection...but not always.

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Original discussion here: https://github.com/usebruno/bruno/discussions/4097#discussion-8008259

@giovesoft giovesoft added the bug Something isn't working label Feb 26, 2025
@rreyn-bruno
Copy link
Collaborator

Copying over my last comment from the discussion, I'm still not able to reproduce. https://app.screencast.com/mlQnzEBC81Kt6

@giovesoft
Copy link
Author

Yes you are right, everything is working as expected.
Few days ago it wasn't, probable something wrong on my side.
https://app.screencast.com/KQVRrBPWIp399

@rreyn-bruno
Copy link
Collaborator

Glad it's sorted! I'll close this.

@rreyn-bruno rreyn-bruno self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants