Skip to content

Commit 8bdc0c8

Browse files
val-2rekram1-node
andauthored
fix: ensure installation commands are using .quiet (anomalyco#5758)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
1 parent 04650f0 commit 8bdc0c8

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

  • packages/opencode/src/installation

packages/opencode/src/installation/index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { BusEvent } from "@/bus/bus-event"
2-
import { Bus } from "@/bus"
32
import path from "path"
43
import { $ } from "bun"
54
import z from "zod"
@@ -66,23 +65,23 @@ export namespace Installation {
6665
const checks = [
6766
{
6867
name: "npm" as const,
69-
command: () => $`npm list -g --depth=0`.throws(false).text(),
68+
command: () => $`npm list -g --depth=0`.throws(false).quiet().text(),
7069
},
7170
{
7271
name: "yarn" as const,
73-
command: () => $`yarn global list`.throws(false).text(),
72+
command: () => $`yarn global list`.throws(false).quiet().text(),
7473
},
7574
{
7675
name: "pnpm" as const,
77-
command: () => $`pnpm list -g --depth=0`.throws(false).text(),
76+
command: () => $`pnpm list -g --depth=0`.throws(false).quiet().text(),
7877
},
7978
{
8079
name: "bun" as const,
81-
command: () => $`bun pm ls -g`.throws(false).text(),
80+
command: () => $`bun pm ls -g`.throws(false).quiet().text(),
8281
},
8382
{
8483
name: "brew" as const,
85-
command: () => $`brew list --formula opencode`.throws(false).text(),
84+
command: () => $`brew list --formula opencode`.throws(false).quiet().text(),
8685
},
8786
]
8887

@@ -112,9 +111,9 @@ export namespace Installation {
112111
)
113112

114113
async function getBrewFormula() {
115-
const tapFormula = await $`brew list --formula sst/tap/opencode`.throws(false).text()
114+
const tapFormula = await $`brew list --formula sst/tap/opencode`.throws(false).quiet().text()
116115
if (tapFormula.includes("opencode")) return "sst/tap/opencode"
117-
const coreFormula = await $`brew list --formula opencode`.throws(false).text()
116+
const coreFormula = await $`brew list --formula opencode`.throws(false).quiet().text()
118117
if (coreFormula.includes("opencode")) return "opencode"
119118
return "opencode"
120119
}

0 commit comments

Comments
 (0)