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
console.log(`[Terminal ${this.id}] Shell integration not available. Command execution aborted.`)
113
-
114
-
// Clean up temporary directory if shell integration is not available
115
-
ShellIntegrationManager.zshCleanupTmpDir(this.id)
123
+
}
116
124
117
-
process.emit(
118
-
"no_shell_integration",
119
-
`Shell integration initialization sequence '\\x1b]633;A' was not received within ${Terminal.getShellIntegrationTimeout()/1000}s. Shell integration has been disabled for this terminal instance. Increase the timeout in the settings if necessary.`,
120
-
)
125
+
if(Terminal.isActiveShellCmdExe()){
126
+
// cmd.exe cannot emit OSC 633;A — skip the timeout entirely and go
127
+
// straight to the execa fallback (VS Code issue #164646).
128
+
ShellIntegrationManager.zshCleanupTmpDir(this.id)
129
+
process.emit("no_shell_integration",{
130
+
message:
131
+
"cmd.exe does not support shell integration (VS Code issue #164646). Command will run via fallback.",
132
+
commandSubmitted: false,
121
133
})
134
+
}else{
135
+
waitForShellIntegration()
136
+
.then(()=>{
137
+
// Clean up temporary directory if shell integration is available, zsh did its job:
138
+
ShellIntegrationManager.zshCleanupTmpDir(this.id)
139
+
140
+
// Run the command in the terminal
141
+
process.run(command)
142
+
})
143
+
.catch(()=>{
144
+
console.log(`[Terminal ${this.id}] Shell integration not available. Command execution aborted.`)
145
+
146
+
// Clean up temporary directory if shell integration is not available
147
+
ShellIntegrationManager.zshCleanupTmpDir(this.id)
148
+
149
+
process.emit("no_shell_integration",{
150
+
message: `Shell integration initialization sequence '\\x1b]633;A' was not received within ${Terminal.getShellIntegrationTimeout()/1000}s. Shell integration has been disabled for this terminal instance. Increase the timeout in the settings if necessary.`,
151
+
commandSubmitted: false,
152
+
})
153
+
})
154
+
}
122
155
})
123
156
124
157
returnmergePromise(process,promise)
@@ -214,8 +247,11 @@ export class Terminal extends BaseTerminal {
214
247
env.PROMPT_EOL_MARK=""
215
248
}
216
249
217
-
// Handle ZDOTDIR for zsh if enabled
218
-
if(Terminal.getTerminalZdotdir()){
250
+
// Handle ZDOTDIR for zsh if enabled. Skip when a profile override is
251
+
// active: VS Code's own shell integration injector also sets ZDOTDIR for
252
+
// zsh, and the two would fight each other (VS Code's ambient env wins per
253
+
// issue #96295). Let VS Code handle injection for the selected profile.
0 commit comments