Skip to content

Commit 5a75a21

Browse files
committed
fix rebase
1 parent 373c6ea commit 5a75a21

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

bun.lock

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opencode/src/tool/bash.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,10 @@ const parser = lazy(async () => {
618618
})
619619

620620
export async function commandFamilies(cmd: string): Promise<string[]> {
621-
const tree = await parser().then((p) => p.parse(cmd))
622-
if (!tree) return [cmd]
621+
const root = await parse(cmd, false).catch(() => undefined)
622+
if (!root) return [cmd]
623623
const result = new Set<string>()
624-
for (const node of tree.rootNode.descendantsOfType("command")) {
624+
for (const node of root.descendantsOfType("command")) {
625625
if (!node) continue
626626
const tokens: string[] = []
627627
for (let i = 0; i < node.childCount; i++) {

0 commit comments

Comments
 (0)