summaryrefslogtreecommitdiff
path: root/src/run.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-04-14 02:41:19 +0200
committermo8it <mo8it@proton.me>2024-04-14 02:41:19 +0200
commitbee62c89de09fdd9823cba81e07f0f8528fe8ef9 (patch)
treebca32899b02862936905ed84624ebd3af2b0e691 /src/run.rs
parent5c0073a9485c4226e58b657cb49628919a28a942 (diff)
Add terminal links
Diffstat (limited to 'src/run.rs')
-rw-r--r--src/run.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/run.rs b/src/run.rs
index 9c504b5..863b584 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -17,18 +17,24 @@ pub fn run(app_state: &mut AppState) -> Result<()> {
if !output.status.success() {
app_state.set_pending(app_state.current_exercise_ind())?;
- bail!("Ran {} with errors", app_state.current_exercise());
+ bail!(
+ "Ran {} with errors",
+ app_state.current_exercise().terminal_link(),
+ );
}
stdout.write_fmt(format_args!(
"{}{}\n",
"✓ Successfully ran ".green(),
- exercise.path.to_string_lossy().green(),
+ exercise.path.green(),
))?;
match app_state.done_current_exercise(&mut stdout)? {
ExercisesProgress::AllDone => (),
- ExercisesProgress::Pending => println!("Next exercise: {}", app_state.current_exercise()),
+ ExercisesProgress::Pending => println!(
+ "Next exercise: {}",
+ app_state.current_exercise().terminal_link(),
+ ),
}
Ok(())