From 30c68922a372755a5b9f918baf053e0d1f156fc5 Mon Sep 17 00:00:00 2001 From: Tommaso Sciortino Date: Tue, 22 Jul 2025 17:18:57 -0700 Subject: Fix windows bugs in atCommandProcessor.ts (#4684) --- packages/cli/src/ui/hooks/atCommandProcessor.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/cli/src/ui/hooks/atCommandProcessor.ts') diff --git a/packages/cli/src/ui/hooks/atCommandProcessor.ts b/packages/cli/src/ui/hooks/atCommandProcessor.ts index 983abc62..237d983f 100644 --- a/packages/cli/src/ui/hooks/atCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/atCommandProcessor.ts @@ -222,14 +222,13 @@ export async function handleAtCommand({ const absolutePath = path.resolve(config.getTargetDir(), pathName); const stats = await fs.stat(absolutePath); if (stats.isDirectory()) { - currentPathSpec = pathName.endsWith('/') - ? `${pathName}**` - : `${pathName}/**`; + currentPathSpec = + pathName + (pathName.endsWith(path.sep) ? `**` : `/**`); onDebugMessage( `Path ${pathName} resolved to directory, using glob: ${currentPathSpec}`, ); } else { - onDebugMessage(`Path ${pathName} resolved to file: ${currentPathSpec}`); + onDebugMessage(`Path ${pathName} resolved to file: ${absolutePath}`); } resolvedSuccessfully = true; } catch (error) { @@ -240,7 +239,10 @@ export async function handleAtCommand({ ); try { const globResult = await globTool.execute( - { pattern: `**/*${pathName}*`, path: config.getTargetDir() }, + { + pattern: `**/*${pathName}*`, + path: config.getTargetDir(), + }, signal, ); if ( -- cgit v1.2.3