Skip to content

Commit

Permalink
Show full detail on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Nov 12, 2024
1 parent d48d098 commit baca44b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/src/timeline/print_console.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:ci/ci.dart';
import 'package:spot/src/timeline/timeline.dart';

/// Extension that adds a method to print the timeline to the console.
Expand All @@ -23,10 +24,16 @@ extension ConsoleTimelinePrinter on Timeline {
final caller = frame != null
? 'at ${frame.member} ${frame.uri}:${frame.line}:${frame.column}'
: 'N/A';
final details = event.details.split('\n').first;
final details =
isCI ? event.details : event.details.split('\n').firstOrNull;
buffer.writeln('==================== Timeline Event ====================');
buffer.writeln('Event Type: ${event.eventType}');
buffer.writeln('Details: $details');
if (details != null) {
buffer.writeln('Details: $details');
}
if (event.description != null) {
buffer.writeln('Description: ${event.description}');
}
buffer.writeln('Caller: $caller');
if (event.screenshot != null) {
buffer.writeln('Screenshot: file://${event.screenshot!.file.path}');
Expand Down

0 comments on commit baca44b

Please sign in to comment.