Kong / Kong/insomnia

Using environment variables inside environment variables functions does not work

Open
#5,574 1 comment 0 reactions 0 assignees View on GitHub
B-bug S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

I would like to set a SHA256 in the environment variables that has another environment variable as its input.

### Actual Behavior

Clicking "Done" resets the input field.

### Reproduction Steps

1. Create a new environment
2. Create an env:
```json
{
"foo": "bar"
"foo_joined": "{{ _.foo }}_baz",
"foo_hash": "{% hash 'sha256', 'hex', _.foo_joined %}"
}
```
3. Click "Done"
4. `foo_joined` removed

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

_No response_

### Insomnia Version

2022.7.0

### What operating system are you using?

macOS

### Operating System Version

latest

### Installation method

Homebrew

### Last Known Working Insomnia version

none

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Reproduce the problem by creating the environment with foo, foo_joined, and foo_hash, then trace the environment-variable editor and template evaluation when clicking “Done”; done means foo_joined is retained and the SHA256 value resolves correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.