Window closes or "Broken Pipe" warning is shown when running `exit`
Detailed steps to reproduce the problem:
- Open iTerm2
What happened: The currently open iTerm2 windows closes. The application keeps running.
When trying again by opening a new window and running
exit, the window now displays a
=== Broken Pipe === message in the line under the prompt and a warning opens "A session ended very soon after starting. Check that the command in profile "Dark" is correct.".
What should have happened: The command is exited normally and the session keeps running.