Skip to content

The Env Variables has not being update from the script #40

@FrancAlvarado

Description

@FrancAlvarado

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
  • this feature was working in a previous version but is broken in the current release.

Bruno version

4.5.0

Operating System

Windows 11

Describe the bug

Im trying to set the a new valiue for an env variable after Login endpoint is consumed, but after the endpoint response the variable is not being updated, in the Post Response I have this script
const body = res.getBody();
bru.setEnvVar("token", body.token);
const token = bru.getEnvVar("token");
console.log("TOKEN ACTUAL =>", token);

the last log shows the token correctly, but when I check directly the value of the env variable it is still empty

Image Image

also this image is showing up many times

Image

.bru file to reproduce the bug

bruno.json

Screenshots/Live demo link

Image Image Image Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions