microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.96k stars 8.35k forks source link

Cannot save settings.json from the UI when it is a symbolic link #17282

Open tunaflsh opened 6 months ago

tunaflsh commented 6 months ago

Windows Terminal version

1.19.11213.0

Windows build number

10.0.22631.3593

Other Software

No response

Steps to reproduce

  1. Replace settings.json with a symbolic link to a settings.json file somewhere else.
  2. Start terminal and open settings.
  3. Perform changes and hit Save

Expected Behavior

The changes get saved into the settings.json file that the symbolic link points to.

Actual Behavior

Nothing happens.

However if I change the symbolic link to a hard link, the changes get saved but then I run into the issue #14730

github-actions[bot] commented 6 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

CrazyWolf13 commented 6 months ago

Possibly a slightly related FR: https://github.com/microsoft/terminal/issues/17277

Firehawke commented 6 months ago

Just hit this one myself. I'm using Dotter to git repo a fair bit of my configuration, including Windows Terminal, and I hit that the UI wasn't actually saving any changes and editing the JSON would only work if I completely exit and reload WT-- it's not detecting any changes to the symlinked config file and hotloading.

DHowett commented 5 months ago

So, my working theory is that it is saving but it is not reloading. This is because we actually use hot reload to power the Save button actually-looking-like-it-has-saved.

1812 reported a similar issue, and we closed it as "By Design" on the grounds that...

Image

happy five year anniversary to my own comment, wow

I'm not convinced the situation is any better, but I feel like there's something we could do specifically to improve Save.

Firehawke commented 5 months ago

How about a workaround of a "force reload" button in the settings panel? It's not a great solution, but it's at least SOMETHING for the moment.

Edit to add: It's been a bit since I looked at it, but I seem to recall opening the JSON in VSCode right after doing a save and it not showing any of the changes I'd just made. If that's the case, then a forced reload button wouldn't help.. but if it IS saving, that forced reload button would at least be a viable (if not great) workaround.