Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settings.json gets regenerated after it is deleted while Windows Terminal is running #17455

Open
soredake opened this issue Jun 20, 2024 · 1 comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Milestone

Comments

@soredake
Copy link

Description of the new feature/enhancement

I store most of my configs in git, I link them with dploy tool, but, there is a problem with Windows Terminal behavior, on windows 11 windows terminal is set as default terminal application, this means all powershell script that I will run from explorer context menu will spawn windows terminal, the problem with windows terminal started is that to link my settings.json config file (for windows terminal) I need to first delete it from $HOME\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState folder, but, when windows terminal is running it will almost immediately will write settings.json to disk even thought you are not changing any settings at this moment, this breaks dploy linking as settings.json file is present.

As a workaround l link this config with New-Item -ItemType SymbolicLink as it's fast enough to create link before this config is written to disk:

Remove-Item -Path $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
New-Item -ItemType SymbolicLink -Path $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json -Target $HOME\git\dotfiles_windows\dotfiles\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json

Proposed technical implementation details (optional)

@soredake soredake added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jun 20, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 20, 2024
@PankajBhojwani PankajBhojwani changed the title Do not write settings.json to disk immediately after it was deleted if no settings is changed settings.json gets regenerated immediately after it is deleted while Windows Terminal is running Jun 26, 2024
@PankajBhojwani PankajBhojwani added the Product-Terminal The new Windows Terminal. label Jun 26, 2024
@PankajBhojwani PankajBhojwani changed the title settings.json gets regenerated immediately after it is deleted while Windows Terminal is running settings.json gets regenerated after it is deleted while Windows Terminal is running Jun 26, 2024
@PankajBhojwani PankajBhojwani added this to the Backlog milestone Jun 26, 2024
@PankajBhojwani PankajBhojwani added Area-Settings Issues related to settings and customizability, for console or terminal and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 26, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 26, 2024
@PankajBhojwani
Copy link
Contributor

Thank you for this! Yep we see how that can be annoying

@PankajBhojwani PankajBhojwani added Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

2 participants