usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
27.01k stars 1.24k forks source link

CLI version 1.20.1 and above - bru.setVar() does not set the variable in the collection variables #2611

Closed hbrahi1 closed 3 months ago

hbrahi1 commented 4 months ago

I have checked the following:

Describe the bug

We (@anubhavhazarika) have observed starting from CLI version 1.20.1 and above that when we call bru.setVar() from one request, the variable does not set the variable in the collection variables and consequently, this variable is not available for any following request. However this works correctly when using the Bruno app. Please check the screenshots and attachments.

.bru file to reproduce the bug

BrunoCollectionVariables.zip

Screenshots/Live demo link

Collection variables using Bruno app v1.20.4: image

Collection variables using Bruno CLI v1.20.3: image

joao-proenca-ada commented 4 months ago

We bumped into this same problem as well. We've had to pin the Bruno CLI version that we're using to 1.20.0 as a workaround (it's not broken with that one), since this broke most of our collections.

helloanoop commented 3 months ago

@joao-proenca-ada @hbrahi1 This issue has been fixed in CLI - v1.20.4 Can you check if this resolves your issue in CLI ?

joao-proenca-ada commented 3 months ago

Hey @helloanoop , just ran a few tests here with v1.20.4 and it seems to be ok now. Thanks.

hbrahi1 commented 3 months ago

Hi @helloanoop , tested ok. Thanks for the fix. Closing the bug.