feat: better time display and tmpdir expands homedir
This commit is contained in:
parent
5c15c3e075
commit
fc3ae1e71a
3 changed files with 5 additions and 1 deletions
|
@ -94,7 +94,7 @@ impl Command {
|
|||
let duration = end.duration_since(start);
|
||||
|
||||
info!("Install complete.");
|
||||
info!("Install took {}ms.", duration.as_nanos() as f64 / 1000000.0);
|
||||
info!("Install took {}.", humantime::format_duration(duration));
|
||||
}
|
||||
Command::Remove {
|
||||
package_identifier,
|
||||
|
|
|
@ -8,6 +8,8 @@ pub struct TempDir {
|
|||
|
||||
impl TempDir {
|
||||
pub fn new(path: PathBuf) -> TempDir {
|
||||
let pbs: String = path.to_str().unwrap().into();
|
||||
let path = expanduser::expanduser(&pbs).unwrap();
|
||||
if !path.exists() {
|
||||
std::fs::create_dir_all(&path).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue