You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DxD] closeOnExit should be sensible when launched via defterm #13325
Area-DefAppIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingPriority-1A description (P1)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
Windows Terminal opens with error "ERROR: The specified directory does not exist."
Expected Behavior
Windows Terminal shouldn't opens every time I turn PC on.
Actual Behavior
Every time I turn PC on and approximately after 30min Windows Terminal automatically opens new windows terminal with error "ERROR: The specified directory does not exist." WT startup is turned off. I don't use additional script to open WT.
Screenshot of the error https://prnt.sc/OTSf0FKHT9Dt
Full tab path C:\WINDOWS\System32\forfiles.exe
Sounds like you've got the Windows Terminal set up as the default terminal emulator, and something you have installed is running a forfiles command. That forfiles is automatically launching in a Terminal window, instead of a console window. However, the Terminal doesn't automatically close when a commandline application exits with an error, unlike the console.
Now, trick here is that forfiles here isn't actually telling you what the missing directory is, just that it couldn't find it. I honestly don't know how you'd figure out who's launching that.
You might be able to mitigate this by setting closeOnExit: always in the profiles.defaults part of the settings.
I think we had previously discussed defterm invocations defaulting to that value - lemme bring that up with the team again.
🌶️ take: for a defterm session, if the profile doesn't have a closeOnExit set, we treat that as always, instead of graceful. We'd need to change that setting to an optional, but because it gets exposed from Profile as a winrt type, it'd need to be an IReference<CloseOnExitMode>, which is a little gross.
changed the title [-]ERROR: The specified directory does not exist.[/-][+][DxD] `closeOnExit` should be sensible when launched via defterm[/+]on Jul 11, 2022
Area-DefAppIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingPriority-1A description (P1)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
Activity
zadjii-msft commentedon Jun 20, 2022
Sounds like you've got the Windows Terminal set up as the default terminal emulator, and something you have installed is running a
forfilescommand. Thatforfilesis automatically launching in a Terminal window, instead of a console window. However, the Terminal doesn't automatically close when a commandline application exits with an error, unlike the console.Now, trick here is that
forfileshere isn't actually telling you what the missing directory is, just that it couldn't find it. I honestly don't know how you'd figure out who's launching that.You might be able to mitigate this by setting
closeOnExit: alwaysin theprofiles.defaultspart of the settings.I think we had previously discussed defterm invocations defaulting to that value - lemme bring that up with the team again.
zadjii-msft commentedon Jul 8, 2022
🌶️ take: for a defterm session, if the profile doesn't have a
closeOnExitset, we treat that asalways, instead ofgraceful. We'd need to change that setting to an optional, but because it gets exposed fromProfileas a winrt type, it'd need to be anIReference<CloseOnExitMode>, which is a little gross.zadjii-msft commentedon Jul 11, 2022
discusssion:
gracefulto "always" for defterm?[-]ERROR: The specified directory does not exist.[/-][+][DxD] `closeOnExit` should be sensible when launched via defterm[/+][DxD] Add 'Automatic' as a mode for CloseOnExit (#13560)
[DxD] Add 'Automatic' as a mode for CloseOnExit (#13560)