microsoft / microsoft/terminal

Environment section in defaults completely overridden by profile-specific one

Open
#16,486 2 comments 3 reactions 0 assignees View on GitHub
Area-Settings Issue-Bug Product-Terminal this-will-be-a-breaking-change
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.19.3172.0

### Windows build number

10.0.22631.2861

### Other Software

_No response_

### Steps to reproduce

1. Create `environment` section inside `defaults` settings and add variable A
`"environment": { "A": "AValue" }`
1. Create `environment` section inside a profile add variable B
`"environment": { "B": "BValue" }`

### Expected Behavior

Both A and B are expected to be defined

### Actual Behavior

Only B is defined

The reason is probably because this section is treated just like any other setting, which when overridden by profile-specific setting it takes nothing from the default section, but this isn't the expected behavior for environment variables, as long as they have different names

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the defaults and profile-specific settings merge, focusing on the environment section described in the reproduction. Confirm the current behavior with the A and B configuration examples, then verify that both variables remain defined when their names differ.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.