Skip to content

Commit

Permalink
add compile time to status message
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-lennox committed Aug 17, 2022
1 parent 457f001 commit 7380641
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/fj-host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use std::{
ops::{Deref, DerefMut},
path::{Path, PathBuf},
process::Command,
str,
sync::mpsc,
thread,
};
Expand Down Expand Up @@ -92,12 +93,14 @@ impl Model {

let command = command_root
.arg("build")
.arg("-q")
.args(["--manifest-path", &manifest_path]);
let exit_status = command.status()?;

let cargo_output = command.output()?;
let exit_status = cargo_output.status;

if exit_status.success() {
status.update_status("Model compiled successfully!");
let seconds_taken = str::from_utf8(&cargo_output.stderr).unwrap().rsplit_once(' ').unwrap().1.trim();
status.update_status(format!("Model compiled successfully in {seconds_taken}!").as_str());
} else {
let output = match command.output() {
Ok(output) => {
Expand Down

0 comments on commit 7380641

Please sign in to comment.