summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/atCommandProcessor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks/atCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/atCommandProcessor.ts12
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 (