mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-24 04:52:43 -07:00
fix windows escaping (and broken tests) (#19011)
This commit is contained in:
committed by
GitHub
parent
c7237f0c79
commit
e7e4c68c5c
@@ -277,8 +277,8 @@ export function makeRelative(
|
||||
*/
|
||||
export function escapePath(filePath: string): string {
|
||||
if (process.platform === 'win32') {
|
||||
// Windows: Double quote if it contains space or special chars
|
||||
if (/[\s()[\]{};|&^$!@%`'~]/.test(filePath)) {
|
||||
// Windows: Double quote if it contains special chars
|
||||
if (/[\s&()[\]{}^=;!'+,`~%$@#]/.test(filePath)) {
|
||||
return `"${filePath}"`;
|
||||
}
|
||||
return filePath;
|
||||
|
||||
Reference in New Issue
Block a user