We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34e7cb0 commit 77955c9Copy full SHA for 77955c9
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/commandLineAutoApprover.ts
@@ -112,7 +112,8 @@ export class CommandLineAutoApprover extends Disposable {
112
113
// For bash/sh/bourne shell and unknown shells (fallback to bourne shell syntax)
114
// Handle environment variable assignments like: VAR=value VAR2=value command
115
- const envVarPattern = /^([A-Za-z_][A-Za-z0-9_]*=(?:[^\s'"]|'[^']*'|"[^"]*")*\s+)+/;
+ // This regex matches one or more environment variable assignments at the start
116
+ const envVarPattern = /^(\s*[A-Za-z_][A-Za-z0-9_]*=(?:[^\s'"]|'[^']*'|"[^"]*")*\s+)+/;
117
const match = trimmedCommand.match(envVarPattern);
118
119
if (match) {
0 commit comments