@@ -101,6 +101,11 @@ function optionalString(value: unknown): string | null {
101101 * record — what a self-hosted deployment behind an unwrapping proxy hands back —
102102 * still polls, rather than refusing to find a status that is right there.
103103 */
104+ /** The run itself: v2 answers `{ data: run }` and the renderer prints exactly what it is handed. */
105+ function runData ( raw : unknown ) : unknown {
106+ return isRecord ( raw ) && isRecord ( raw . data ) ? raw . data : raw
107+ }
108+
104109function readRun ( raw : unknown ) : RunSnapshot {
105110 const run = isRecord ( raw ) && isRecord ( raw . data ) ? raw . data : raw
106111 if ( ! isRecord ( run ) || typeof run . status !== 'string' ) {
@@ -254,7 +259,7 @@ export function attachWorkflowRunWait(runs: Command): void {
254259
255260 if ( outcome ) {
256261 progress . finish ( )
257- renderResult ( 'getWorkflowRun' , profile . output , raw , runSpec ( ) )
262+ renderResult ( 'getWorkflowRun' , profile . output , runData ( raw ) , runSpec ( ) )
258263 const message = explain ( outcome , runId , options . workflow , snapshot )
259264 if ( message ) console . error ( chalk . red ( message ) )
260265 setSoftExitCode ( WAIT_EXIT_CODES [ outcome ] )
@@ -264,7 +269,7 @@ export function attachWorkflowRunWait(runs: Command): void {
264269 const remainingMs = deadline - Date . now ( )
265270 if ( remainingMs <= 0 ) {
266271 progress . finish ( )
267- renderResult ( 'getWorkflowRun' , profile . output , raw , runSpec ( ) )
272+ renderResult ( 'getWorkflowRun' , profile . output , runData ( raw ) , runSpec ( ) )
268273 console . error (
269274 chalk . red (
270275 `Timed out after ${ timeoutSeconds } s waiting for run ${ runId } (status: ${ snapshot . status } ${
0 commit comments