mirror of https://github.com/jackwener/wx-cli.git
Merge pull request #62 from Icy-Cat/fix/init-error-shows-config-path
fix(init): show config.json path in auto-detect errorpull/77/head
commit
5f87ce6348
|
|
@ -35,8 +35,13 @@ pub fn cmd_init(force: bool) -> Result<()> {
|
||||||
|
|
||||||
// Step 1: 检测 db_dir
|
// Step 1: 检测 db_dir
|
||||||
println!("检测微信数据目录...");
|
println!("检测微信数据目录...");
|
||||||
let db_dir = config::auto_detect_db_dir()
|
let db_dir = config::auto_detect_db_dir().with_context(|| format!(
|
||||||
.context("未能自动检测到微信数据目录\n请手动编辑 config.json 中的 db_dir 字段")?;
|
"未能自动检测到微信数据目录\n\
|
||||||
|
请编辑配置文件并填写 db_dir 字段:\n \
|
||||||
|
{}\n\
|
||||||
|
(文件不存在则首次保存后自动创建;db_dir 示例: <data_root>\\xwechat_files\\<wxid>\\db_storage)",
|
||||||
|
config_path.display()
|
||||||
|
))?;
|
||||||
println!("找到数据目录: {}", db_dir.display());
|
println!("找到数据目录: {}", db_dir.display());
|
||||||
|
|
||||||
// Step 2: 扫描密钥(需要 root/sudo)
|
// Step 2: 扫描密钥(需要 root/sudo)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue