From 89d68927c617bd0e0f996a88630fc416e0fc576a Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 25 Aug 2026 17:48:23 +0900 Subject: [PATCH] Detect bun/node runtime version by basename, not exact command file detectDirectRuntimeVersion switched on command.file === 'bun'|'node', so a resolved absolute path (e.g. /home/claude/.bun/bin/bun) fell through to "host:" and lost the version. Match on path.basename so the version probe fires and runtimeVersion stays "host:bun@" regardless of how the package-manager command was resolved. Co-Authored-By: Claude Opus 4.7 --- src/verification.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/verification.ts b/src/verification.ts index e62c663..4966ae6 100644 --- a/src/verification.ts +++ b/src/verification.ts @@ -151,10 +151,14 @@ function readPackageScripts(repoDir: string): Record { function detectDirectRuntimeVersion( command: Pick, ): string { + // The command file may be a bare name ("bun") or a resolved absolute path + // ("/home/claude/.bun/bin/bun"); match on the basename so version detection + // still fires instead of degrading to "host:". + const runtimeName = path.basename(command.file); try { - switch (command.file) { + switch (runtimeName) { case 'bun': { - const bunVersion = execFileSync('bun', ['--version'], { + const bunVersion = execFileSync(command.file, ['--version'], { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 5000,