Skip to content

Commit ccda1de

Browse files
robstolarzclaude
andcommitted
fix: clean up depot ci status output into multi-line format
Break the long single-line attempt output into structured multi-line: Attempt #1 (running) sandbox: abc123 Logs: depot ci logs ... View: https://... SSH: depot ci ssh ... Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7ae8278 commit ccda1de

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

pkg/cmd/ci/status.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,19 @@ func NewCmdStatus() *cobra.Command {
5858
fmt.Printf(" Job: %s [%s] (%s)\n", job.JobId, job.JobKey, job.Status)
5959

6060
for _, attempt := range job.Attempts {
61-
line := fmt.Sprintf(" Attempt: %s #%d (%s)", attempt.AttemptId, attempt.Attempt, attempt.Status)
62-
if sid := attempt.GetSandboxId(); sid != "" {
61+
sid := attempt.GetSandboxId()
62+
isRunning := attempt.Status != "finished" && attempt.Status != "failed" && attempt.Status != "cancelled"
63+
64+
line := fmt.Sprintf(" Attempt #%d (%s)", attempt.Attempt, attempt.Status)
65+
if sid != "" {
6366
line += fmt.Sprintf(" sandbox: %s", sid)
6467
}
65-
line += fmt.Sprintf(" \xe2\x86\x92 depot ci logs %s | https://depot.dev/orgs/%s/workflows/%s", attempt.AttemptId, resp.OrgId, attempt.AttemptId)
66-
if attempt.GetSandboxId() != "" && attempt.Status != "finished" && attempt.Status != "failed" && attempt.Status != "cancelled" {
67-
line += fmt.Sprintf(" | depot ci ssh %s --job %s", resp.RunId, job.JobKey)
68-
}
6968
fmt.Println(line)
69+
fmt.Printf(" Logs: depot ci logs %s\n", attempt.AttemptId)
70+
fmt.Printf(" View: https://depot.dev/orgs/%s/workflows/%s\n", resp.OrgId, attempt.AttemptId)
71+
if sid != "" && isRunning {
72+
fmt.Printf(" SSH: depot ci ssh %s --job %s\n", resp.RunId, job.JobKey)
73+
}
7074
}
7175
}
7276
}

0 commit comments

Comments
 (0)