refactor(config): use the logger
This commit is contained in:
parent
d13657c40c
commit
e5c11d9efc
2 changed files with 4 additions and 2 deletions
|
|
@ -22,5 +22,6 @@ workspace = true
|
|||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
etcetera.workspace = true
|
||||
log.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ use std::{env, fs, path::PathBuf};
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
use etcetera::BaseStrategy as _;
|
||||
use log::warn;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
|
|
@ -47,8 +48,8 @@ impl Config {
|
|||
if legacy_apple_path.is_file() {
|
||||
fs::create_dir_all(xdg_path.parent().unwrap())?;
|
||||
fs::rename(&legacy_apple_path, &xdg_path)?;
|
||||
println!(
|
||||
"Warning: your config.json file has been automatically migrated from \"{}\" to \"{}\"",
|
||||
warn!(
|
||||
"Your config.json file has been automatically migrated from \"{}\" to \"{}\"",
|
||||
legacy_apple_path.display(),
|
||||
xdg_path.display()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue