Skip to content

Commit

Permalink
Fix TermControl initialization to pre-seed working dir (#9397)
Browse files Browse the repository at this point in the history
## PR Checklist
* [x] Closes #8969
* [x] CLA signed.
* [ ] Tests added/passed
* [ ] Documentation updated.
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already.

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

(cherry picked from commit 19bd0c9)
  • Loading branch information
Don-Vito authored and DHowett committed Mar 15, 2021
1 parent 7f1bdaf commit c7dc350
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation

_terminal = std::make_unique<::Microsoft::Terminal::Core::Terminal>();

// GH#8969: pre-seed working directory to prevent potential races
_terminal->SetWorkingDirectory(_settings.StartingDirectory());

auto pfnWarningBell = std::bind(&TermControl::_TerminalWarningBell, this);
_terminal->SetWarningBellCallback(pfnWarningBell);

Expand Down

0 comments on commit c7dc350

Please sign in to comment.