diff options
| author | Tommaso Sciortino <[email protected]> | 2025-07-22 17:18:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-23 00:18:57 +0000 |
| commit | 30c68922a372755a5b9f918baf053e0d1f156fc5 (patch) | |
| tree | f2889f7f89fc3609071f943ce110a0d755d78b7f /packages/cli/src/ui/hooks/atCommandProcessor.ts | |
| parent | a00f1bb916b551fc17fa5bab80fb51dcdc88f00d (diff) | |
Fix windows bugs in atCommandProcessor.ts (#4684)
Diffstat (limited to 'packages/cli/src/ui/hooks/atCommandProcessor.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/atCommandProcessor.ts | 12 |
1 files changed, 7 insertions, 5 deletions
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 ( |
