Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion packages/opencode/src/cli/cmd/plug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,23 @@ export type PlugCtx = {
}

const defaultPlugDeps: PlugDeps = {
spinner: () => spinner(),
spinner: () => {
// Non-TTY environments (CI, subprocess, PowerShell): use plain text output
// to avoid ANSI escape sequences being printed as garbage
if (!process.stdout.isTTY) {
return {
start: (msg: string) => console.log(msg),
stop: (msg: string, code?: number) => {
if (code && code !== 0) {
console.error(msg)
} else {
console.log(msg)
}
},
}
}
return spinner()
},
log: {
error: (msg) => log.error(msg),
info: (msg) => log.info(msg),
Expand Down
Loading