-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Profiles missing after resetting config #11119
Comments
HMMMMMM This is a good point. In 1.11 (and backported to 1.10), we added the ability to just delete dynamic profiles from the settings, and have them not auto-regenerate. But if you totally blow away the settings file, that's kinda a different case now. @DHowett @lhecker for discussion: if |
@zadjii-msft Is there anything left to do here after merging that docs change? |
Oh we were going to change the Terminal so that when we encounter a missing or empty |
If we find that the settings file doesn't exist, or is empty, then let's quick delete the state file as well. If the user does have a state file, and not a settings, then they probably tried to reset their settings. It might have data in it that was only relevant for a previous iteration of the settings file. If we don't, we'll load the old state and ignore all dynamic profiles (for example)! We'll remove all of the data in the `ApplicationState` object and reset it to the defaults. This will delete the state file! That's the sure-fire way to make sure the data doesn't come back. If we leave it untouched, then when we go to write the file back out, we'll first re-read it's contents and try to overlay our new state. However, nullopts won't remove keys from the JSON, so we'll end up with the original state in the file. * [x] Closes #11119 * [x] Tested on a cold launch of the Terminal with an existing `state.json` and an empty `settings.json` * [x] Tested a hot-reload of deleting the `settings.json`
If we find that the settings file doesn't exist, or is empty, then let's quick delete the state file as well. If the user does have a state file, and not a settings, then they probably tried to reset their settings. It might have data in it that was only relevant for a previous iteration of the settings file. If we don't, we'll load the old state and ignore all dynamic profiles (for example)! We'll remove all of the data in the `ApplicationState` object and reset it to the defaults. This will delete the state file! That's the sure-fire way to make sure the data doesn't come back. If we leave it untouched, then when we go to write the file back out, we'll first re-read it's contents and try to overlay our new state. However, nullopts won't remove keys from the JSON, so we'll end up with the original state in the file. * [x] Closes #11119 * [x] Tested on a cold launch of the Terminal with an existing `state.json` and an empty `settings.json` * [x] Tested a hot-reload of deleting the `settings.json`
If we find that the settings file doesn't exist, or is empty, then let's quick delete the state file as well. If the user does have a state file, and not a settings, then they probably tried to reset their settings. It might have data in it that was only relevant for a previous iteration of the settings file. If we don't, we'll load the old state and ignore all dynamic profiles (for example)! We'll remove all of the data in the `ApplicationState` object and reset it to the defaults. This will delete the state file! That's the sure-fire way to make sure the data doesn't come back. If we leave it untouched, then when we go to write the file back out, we'll first re-read it's contents and try to overlay our new state. However, nullopts won't remove keys from the JSON, so we'll end up with the original state in the file. * [x] Closes #11119 * [x] Tested on a cold launch of the Terminal with an existing `state.json` and an empty `settings.json` * [x] Tested a hot-reload of deleting the `settings.json`
If we find that the settings file doesn't exist, or is empty, then let's quick delete the state file as well. If the user does have a state file, and not a settings, then they probably tried to reset their settings. It might have data in it that was only relevant for a previous iteration of the settings file. If we don't, we'll load the old state and ignore all dynamic profiles (for example)! We'll remove all of the data in the `ApplicationState` object and reset it to the defaults. This will delete the state file! That's the sure-fire way to make sure the data doesn't come back. If we leave it untouched, then when we go to write the file back out, we'll first re-read it's contents and try to overlay our new state. However, nullopts won't remove keys from the JSON, so we'll end up with the original state in the file. * [x] Closes #11119 * [x] Tested on a cold launch of the Terminal with an existing `state.json` and an empty `settings.json` * [x] Tested a hot-reload of deleting the `settings.json` (cherry picked from commit 8dd3173)
Windows Terminal version (or Windows build number)
1.10.2383.0
Other Software
No response
Steps to reproduce
as per notes at top of config file, i wanted to ensure that i had any new defaults now that v1.10 has been released
"..It should still be usable in newer versions, but newer versions might have additional
settings, help text, or changes that you will not see unless you clear this file
and let us generate a new one for you."
Expected Behavior
expected that all default profiles get regenerated
Actual Behavior
only "windows powershell" and "Command prompt" appear.
Also note that terminal did infact launch "powershell" (v7.1.4) and had an empty dropdown in the "default profile" box in settings as what was launched did not have any profile.
I had to reset the app to restore all my profiles
The text was updated successfully, but these errors were encountered: