mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix #145265
This commit is contained in:
parent
d472403e42
commit
89d1004371
|
@ -121,7 +121,8 @@ export function prepareCommand(shell: string, args: string[], cwd?: string, env?
|
|||
|
||||
quote = (s: string) => {
|
||||
s = s.replace(/\"/g, '""');
|
||||
return (' "><!^&'.split('').some(char => s.includes(char)) || s.length === 0) ? `"${s}"` : s;
|
||||
s = s.replace(/([><!^&\|])/g, '^$1');
|
||||
return (' "'.split('').some(char => s.includes(char)) || s.length === 0) ? `"${s}"` : s;
|
||||
};
|
||||
|
||||
if (cwd) {
|
||||
|
|
Loading…
Reference in a new issue