File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/debug/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -320,7 +320,6 @@ export function prepareCommand(args: DebugProtocol.RunInTerminalRequestArguments
320320 }
321321
322322 let quote : ( s : string ) => string ;
323- let hardQuote : ( s : string ) => string ;
324323 let command = '' ;
325324
326325 switch ( shellType ) {
@@ -392,12 +391,12 @@ export function prepareCommand(args: DebugProtocol.RunInTerminalRequestArguments
392391 return ( s . indexOf ( ' ' ) >= 0 || s . indexOf ( '\\' ) >= 0 ) ? `"${ s } "` : s ;
393392 } ;
394393
395- hardQuote = ( s : string ) => {
394+ const hardQuote = ( s : string ) => {
396395 return / [ ^ \w @ % \/ + = , . : ^ - ] / . test ( s ) ? `'${ s . replace ( / ' / g, '\'\\\'\'' ) } '` : s ;
397396 } ;
398397
399398 if ( args . cwd ) {
400- command += `cd ${ hardQuote ( args . cwd ) } && ` ;
399+ command += `cd ${ quote ( args . cwd ) } && ` ;
401400 }
402401 if ( args . env ) {
403402 command += 'env' ;
You can’t perform that action at this time.
0 commit comments