Fix Windows cmd quoting for Python
This commit is contained in:
@@ -27,6 +27,9 @@ function splitCommand(command: string): string[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function quoteWindowsCmdArg(value: string): string {
|
function quoteWindowsCmdArg(value: string): string {
|
||||||
|
if (!/[ \t"&()<>^|]/.test(value)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
return `"${value.replace(/"/g, '""')}"`;
|
return `"${value.replace(/"/g, '""')}"`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user