Skip to content

Commit 602382a

Browse files
committed
fix(doctor): correct display name for file-path adapters (dist/ → adapter name)
Made-with: Cursor
1 parent 8aa8fd6 commit 602382a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/core/src/cli.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,17 @@ async function cmdDoctor(args: string[]): Promise<void> {
461461

462462
// Short display name
463463
const displayName = key.startsWith("/") || key.startsWith(".")
464-
? path.basename(path.dirname(key))
464+
? (() => {
465+
// For file paths like /path/to/adapter-linkedin/dist/index.js
466+
// we want "adapter-linkedin", not "dist"
467+
const dir = path.dirname(key);
468+
const base = path.basename(dir);
469+
// If the immediate parent is "dist", "src", etc., go one more level up
470+
if (["dist", "src", "build", "lib"].includes(base)) {
471+
return path.basename(path.dirname(dir));
472+
}
473+
return base;
474+
})()
465475
: key.replace("@browserkit-dev/", "");
466476

467477
let status: string;

0 commit comments

Comments
 (0)