fix windows escaping (and broken tests) (#19011)

This commit is contained in:
Tommaso Sciortino
2026-02-13 14:19:08 -08:00
committed by GitHub
parent c7237f0c79
commit e7e4c68c5c
4 changed files with 16 additions and 14 deletions

View File

@@ -290,8 +290,8 @@ describe('handleAtCommand', () => {
path.join(testRootDir, 'path', 'to', 'my file.txt'),
fileContent,
);
const escapedpath = path.join(testRootDir, 'path', 'to', 'my\\ file.txt');
const query = `@${escapedpath}`;
const query = `@${core.escapePath(filePath)}`;
const result = await handleAtCommand({
query,
@@ -960,8 +960,8 @@ describe('handleAtCommand', () => {
path.join(testRootDir, 'spaced file.txt'),
fileContent,
);
const escapedPath = path.join(testRootDir, 'spaced\\ file.txt');
const query = `Check @${escapedPath}, it has spaces.`;
const query = `Check @${core.escapePath(filePath)}, it has spaces.`;
const result = await handleAtCommand({
query,