Skip to content

Commit

Permalink
Fix #145265
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Apr 20, 2022
1 parent d472403 commit 89d1004
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/contrib/debug/node/terminals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

1 comment on commit 89d1004

@boardkeystown
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this broke std redirect

"args":[">","out.txt"]

then this needs to be fixed!

Please sign in to comment.