Skip to content

Commit 064524b

Browse files
committed
fix(cli): resolve deadlock in CI mode by consuming status channel
1 parent ebca28d commit 064524b

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

cmd/simili/commands/process.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,23 @@ func runProcess() {
219219
if isCI {
220220
// Run pipeline directly without TUI in CI environments
221221
fmt.Println("[Simili-Bot] Running in CI mode (no TUI)")
222+
223+
// Start a goroutine to consume status updates and print them
224+
go func() {
225+
for msg := range statusChan {
226+
switch msg.Status {
227+
case "error":
228+
fmt.Printf("❌ [%s] %s\n", msg.Step, msg.Message)
229+
case "success":
230+
fmt.Printf("✅ [%s] %s\n", msg.Step, msg.Message)
231+
case "started":
232+
fmt.Printf("🔄 [%s] %s\n", msg.Step, msg.Message)
233+
case "skipped":
234+
fmt.Printf("⏭️ [%s] %s\n", msg.Step, msg.Message)
235+
}
236+
}
237+
}()
238+
222239
runPipeline(nil, deps, stepNames, &issue, cfg, statusChan)
223240
fmt.Println("[Simili-Bot] Pipeline completed")
224241
} else {

0 commit comments

Comments
 (0)