-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Display a specific error for not finding the default profile #1348
Comments
I would like to add that this should also happen if the default profile is present but fails to load. So, even if profiles.json is correct and default profile actually exists in it, but the command runs and exits in less than 5 seconds, you should get a dialog saying "command exited almost immediately, please check profiles.json to ensure it is correct". This is similar to what OS X's Terminal application and the popular Windows "ConEmu" application already do. I actually came across this issue in a nasty way: when I installed Windows Terminal on a new laptop, Windows Store downloaded the profiles.json file from my previous laptop. When I launched the application the window appeared and immediately disappeared without giving me a chance to read the output. What was happening is that I had edited the command for my default profile and set it to:
Now, normally in my home folder I have a file "env.ps1" where I define some functions, aliases etc. Because the new laptop did NOT have this file yet, powershell would exit immediately with an error. |
Please at least minimally stop the crash from happening when the default is gone. Choose a different profile and try to recover. |
* Warn the user when their settings are bad The start of work on #1348 * Display an error dialog for errors during validation * Polish for PR * Add a ton of tests * Polish the _GetMessageText bits * Add code to check for duplicate profiles * Verify that many warnings work at the same time * comments y'all * Apply fixes for dustin's thoughts from PR * Add a proper exception type, use an array instead of a map * PR Fixes * Fix x86 build break * Add a bit on "using the defaults" when we encountering an exception * remove a redundant variable * guid->GUID * Address Michael's PR comments * Clean up this error text, and catch exceptions better * Update src/cascadia/TerminalApp/Resources/en-US/Resources.resw
🎉This issue was addressed in #2422, which has now been successfully released as Handy links: |
From #1343
profiles.json
and thedefaultProfile
doesn't exist in the list of profiles, we should display an error specific to that failure case.Maybe also:
The text was updated successfully, but these errors were encountered: