@@ -26,8 +26,6 @@ import (
2626
2727 "github.com/livekit/protocol/livekit"
2828 agent "github.com/livekit/protocol/livekit/agent"
29-
30- "github.com/livekit/livekit-cli/v2/pkg/util"
3129)
3230
3331type toggleWriter struct {
@@ -175,12 +173,12 @@ func runSimulateCI(ctx context.Context, config *simulateConfig) error {
175173
176174 // --- Results ---
177175
178- if util . InCI () {
176+ if ! out . Interactive () {
179177 report .Results (run , agent )
180178 } else {
181- // This path also serves humans whose stdin/stdout merely isn 't a TTY
182- // (pipes, task runners): keep the terminal to counts and pointers,
183- // the per-scenario transcripts go to a report file like the TUI's.
179+ // A terminal is watching; we just couldn 't open the TUI (e.g. stdin
180+ // isn't a TTY). Keep it to counts and pointers, the per-scenario
181+ // transcripts go to a report file like the TUI's.
184182 if f , err := os .CreateTemp ("" , "lk-simulate-report-*.txt" ); err == nil {
185183 writeRunResults (asciiWriter {f }, run , agent )
186184 f .Close ()
@@ -201,7 +199,7 @@ func runSimulateCI(ctx context.Context, config *simulateConfig) error {
201199 _ , _ , _ , failed := simulationJobCounts (run )
202200 if failed > 0 || run .Status == livekit .SimulationRun_STATUS_FAILED {
203201 errPrefix := ""
204- if util . InCI () {
202+ if ! out . Interactive () {
205203 errPrefix = "::error::"
206204 }
207205 if failed > 0 {
0 commit comments