Merge pull request #117138 from shskwmt/fix/116822

Fixes #116822: Remove escaping whitespace characters
This commit is contained in:
Daniel Imms 2021-03-01 09:50:18 -08:00 committed by GitHub
commit e4a69193d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,9 +237,6 @@ export function escapeNonWindowsPath(path: string): string {
if (newPath.indexOf('\\') !== 0) {
newPath = newPath.replace(/\\/g, '\\\\');
}
if (newPath.indexOf(' ') !== -1) {
newPath = newPath.replace(/ /g, '\\ ');
}
const bannedChars = /[\`\$\|\&\>\~\#\!\^\*\;\<\"\']/g;
newPath = newPath.replace(bannedChars, '');
return `'${newPath}'`;