terminal icon indicating copy to clipboard operation
terminal copied to clipboard

If settings.json in portable settings folder (or folder itself) is not writeable WT will crash if you try to save settings

Open PGomersall opened this issue 6 months ago • 3 comments

Windows Terminal version

1.22.250314001 Portable (probably other versions as well)

Windows build number

10.0.26100.4061

Other Software

N\A

Steps to reproduce

Open settings UI, make a change click save > WT crashes

Expected Behavior

An error should be raised if settings.json is not writeable, but WT should not crash.

Actual Behavior

WT Crashes. If folder is writeable but not the settings.json file a settings.json.tmp is created

PGomersall avatar May 14 '25 20:05 PGomersall

canary terminal-1.24.1351.0 same.

Zeroes1 avatar May 18 '25 23:05 Zeroes1

Thanks! I could have sworn we had a duplicate for this, but it appears that we don't. Congrats!

Though: why is it not writable? 🙃

DHowett avatar May 28 '25 20:05 DHowett

Though: why is it not writable?

@DHowett I had a script to automate updating and or creation of the portable in C:\WT which runs as system. On some systems the default permissions on C:\ and therefore the inherited C:\WT did not give users more than read and execute. I added code in my script to deal with this, but wt should not crash regardless trying to write to the settings file that is effectively locked, hence my bug ticket.

PGomersall avatar May 28 '25 20:05 PGomersall