feat: multiline logging
All checks were successful
/ check (push) Successful in 38s

This commit is contained in:
Didier Slof 2023-07-19 16:15:26 +02:00
parent b115b91ecb
commit e4eb85f535
Signed by: didier
GPG key ID: 01E71F18AA4398E5
7 changed files with 75 additions and 38 deletions

View file

@ -1,4 +1,5 @@
use std::path::PathBuf;
use crate::CONFIG;
pub struct TempDir {
path: PathBuf,
@ -20,9 +21,11 @@ impl TempDir {
impl Default for TempDir {
fn default() -> TempDir {
TempDir::new({
let mut t = std::env::temp_dir();
t.push("pkgr");
t
if let Some(d) = CONFIG.with(|c| c.tmp_dir.clone()) {
PathBuf::from(d)
} else {
PathBuf::from("/tmp/pkgr")
}
})
}
}