[PR #3204] [MERGED] Expand env. vars in backgroundImage #25268

Open
opened 2026-01-31 09:08:25 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3204
Author: @bitcrazed
Created: 10/15/2019
Status: Merged
Merged: 11/16/2019
Merged by: @DHowett-MSFT

Base: masterHead: bitcrazed/Expand-Background-Image-Path


📝 Commits (10+)

  • 9677cd7 Expands env-vars in background image paths
  • daf6e3a Added check for expansion in tests
  • c5df866 In-progress. Incomplete. Ignore
  • 219d354 Merge branch 'master' into bitcrazed/Expand-Background-Image-Path
  • adbf678 Merge branch 'master' into bitcrazed/Expand-Background-Image-Path
  • 5085cc8 Fixed-up expanded icon path test
  • d82dd32 Merge branch 'master' into bitcrazed/Expand-Background-Image-Path
  • 31c611b Fixed unit test (layered JSON -> user settings)
  • 6e6e8ec Merge branch 'master' into bitcrazed/Expand-Background-Image-Path
  • 873c90b Corrected variable init

📊 Changes

4 files changed (+76 additions, -2 deletions)

View changed files

📝 src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp (+48 -0)
📝 src/cascadia/TerminalApp/Profile.cpp (+24 -2)
📝 src/cascadia/TerminalApp/Profile.h (+3 -0)
📝 src/inc/LibraryIncludes.h (+1 -0)

📄 Description

Summary of the Pull Request

  • Adds HasBackgroundImage() and GetExpandedBackgroundImagePath() to
    Profiles.cpp/h
  • Fills Terminal Settings with expanded path, rather than path value
    from profiles.json
  • Adds simple regression tests to detect and fail if this fix is
    circumvented in the future

PR Checklist

  • Closes Please add the "Default Maximize" option (#2922)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

  • Comprehensive debugging with expected, unexpected and empty path strings
  • Tests executed & validated

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/3204 **Author:** [@bitcrazed](https://github.com/bitcrazed) **Created:** 10/15/2019 **Status:** ✅ Merged **Merged:** 11/16/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `bitcrazed/Expand-Background-Image-Path` --- ### 📝 Commits (10+) - [`9677cd7`](https://github.com/microsoft/terminal/commit/9677cd7caf4fb97e83dea3e25a22feea29fb29d2) Expands env-vars in background image paths - [`daf6e3a`](https://github.com/microsoft/terminal/commit/daf6e3a3a3d0cc62e8af56c7c2e11cf384331edb) Added check for expansion in tests - [`c5df866`](https://github.com/microsoft/terminal/commit/c5df8663730c888524574bb9e4a0fc31cc0fe0d9) In-progress. Incomplete. Ignore - [`219d354`](https://github.com/microsoft/terminal/commit/219d3544c8afdfd627de52b55edcd8718e0a8879) Merge branch 'master' into bitcrazed/Expand-Background-Image-Path - [`adbf678`](https://github.com/microsoft/terminal/commit/adbf678ccb7df6b0b034d2774606638ba0961274) Merge branch 'master' into bitcrazed/Expand-Background-Image-Path - [`5085cc8`](https://github.com/microsoft/terminal/commit/5085cc871a6aaec71f218146ab39afdd9164e9c1) Fixed-up expanded icon path test - [`d82dd32`](https://github.com/microsoft/terminal/commit/d82dd32034a9394a913d3de96e9e34679477e4f3) Merge branch 'master' into bitcrazed/Expand-Background-Image-Path - [`31c611b`](https://github.com/microsoft/terminal/commit/31c611b247f68a34568d25f0f673d51f7d18cbeb) Fixed unit test (layered JSON -> user settings) - [`6e6e8ec`](https://github.com/microsoft/terminal/commit/6e6e8ec896e690e2486e81f1554627746ba89aff) Merge branch 'master' into bitcrazed/Expand-Background-Image-Path - [`873c90b`](https://github.com/microsoft/terminal/commit/873c90bbc9da8615661db0f9531ff9d294de88c6) Corrected variable init ### 📊 Changes **4 files changed** (+76 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp` (+48 -0) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+24 -2) 📝 `src/cascadia/TerminalApp/Profile.h` (+3 -0) 📝 `src/inc/LibraryIncludes.h` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request * Adds HasBackgroundImage() and GetExpandedBackgroundImagePath() to Profiles.cpp/h * Fills Terminal Settings with expanded path, rather than path value from profiles.json * Adds simple regression tests to detect and fail if this fix is circumvented in the future ## PR Checklist * [X] Closes #2922 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [X] Tests added/passed * [ ] Requires documentation to be updated * [X] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Validation Steps Performed * Comprehensive debugging with expected, unexpected and empty path strings * Tests executed & validated --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:08:25 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25268