mirror of
https://github.com/ruvnet/RuView.git
synced 2026-10-21 22:22:33 -05:00
fix(cli): retain abort status after finalize failure
This commit is contained in:
1 parent
18d98d9452
commit
99cea559f9
1 file changed
+5
-2
@@ -616,13 +616,16 @@ async fn finalize(
|
||||
status.write().await.session = Some(snap);
|
||||
}
|
||||
|
||||
// `CalibrationRecorder::finalize` consumes the recorder, so retain a
|
||||
// terminal snapshot before attempting the fallible operation.
|
||||
let mut aborted_snapshot = session_snapshot(&sess, "aborted", None);
|
||||
let baseline: BaselineCalibration = match sess.recorder.finalize() {
|
||||
Ok(baseline) => baseline,
|
||||
Err(e) => {
|
||||
let message = format!("finalize failed: {e}");
|
||||
let note = format!("aborted: {message}");
|
||||
let snap = session_snapshot(&sess, "aborted", Some(note.clone()));
|
||||
status.write().await.session = Some(snap);
|
||||
aborted_snapshot.note = Some(note.clone());
|
||||
status.write().await.session = Some(aborted_snapshot);
|
||||
eprintln!("[calibrate-serve] {note}");
|
||||
return Err(message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user