quote '$' properly; fixes #98471
This commit is contained in:
parent
89e9395125
commit
07a56fd95d
|
@ -164,7 +164,7 @@ export function prepareCommand(args: DebugProtocol.RunInTerminalRequestArguments
|
|||
case ShellType.bash:
|
||||
|
||||
quote = (s: string) => {
|
||||
s = s.replace(/(["'\\])/g, '\\$1');
|
||||
s = s.replace(/(["'\\\$])/g, '\\$1');
|
||||
return (s.indexOf(' ') >= 0 || s.indexOf(';') >= 0 || s.length === 0) ? `"${s}"` : s;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue