mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-28 11:05:31 +08:00
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:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user