docs(jetbrains): fix Bun Path Hint wording and use Bun.which for bun lookup

Addresses PR review: repairs the broken sentence in the SKILL.md Bun Path
Hint section and replaces the dead 'command -v bun' lookup (not a Bun $
shell builtin) with native Bun.which.
This commit is contained in:
kirillk
2026-08-05 11:29:44 -04:00
parent 80ca29f85a
commit f035c871ff
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ the only reliable reset.
In repo CLI mode, Gradle's `generateOpenApiSpec` task runs the local CLI source through
`bun run --conditions=browser ./src/index.ts generate`. IDE-launched Gradle runs can have
worktree-local hint:
a stripped `PATH` where `bun` isn't resolvable. The `unpin`/`regen` commands write an ignored, worktree-local hint:
```text
packages/kilo-jetbrains/.gradle/kilo-cli-pin.properties
@@ -53,14 +53,12 @@ async function setPinned(value: boolean) {
await Bun.write(props, text.replace(/^kilo\.cli\.pinned=.*$/m, `kilo.cli.pinned=${value}`))
}
async function bunPath() {
const result = await $`command -v bun`.quiet().nothrow()
const bin = result.exitCode === 0 ? result.stdout.toString().trim() : ""
return bin || process.execPath
function bunPath() {
return Bun.which("bun") ?? process.execPath
}
async function writeBunHint() {
const path = await bunPath()
const path = bunPath()
await $`mkdir -p ${jb}/.gradle`
await Bun.write(hint, `# Generated by jetbrains-cli-pin so IDE-launched Gradle can find Bun in repo CLI mode.\nbun.path=${path}\n`)
console.log(`Wrote Bun path hint for repo CLI mode: ${path}`)