Commit b19958b
committed
Keep the end of long output, and pass the command line to _helpless
The typescript was capped with head -n 1024, keeping the start of the output.
Errors are usually at the end (tracebacks, make: *** Error, segfaults), so a
program that printed a lot and then failed lost its error before any helper or
_helpless saw it. Now keep the first 64 lines (where the command line is echoed
and found) plus the last 1024, with a marker for what was omitted.
_helpless now also receives the command line as a second argument, so whatever
explains the output (in cs50/codespace, the CS50 Duck via cs50.ai) can see what
was run. The default _helpless ignores it; output stays the first argument, so
the codespace's empty-output check is unaffected.1 parent 400e6c1 commit b19958b
1 file changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
111 | | - | |
112 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
123 | 132 | | |
124 | 133 | | |
125 | 134 | | |
126 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
127 | 140 | | |
128 | 141 | | |
129 | 142 | | |
| |||
0 commit comments