mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-05 22:20:25 +08:00
fix: add context to file-not-found errors (#7665)
This commit is contained in:
@@ -348,12 +348,16 @@ impl CoreConfigValidator {
|
||||
logging!(info, Type::Validate, "验证目录: {}", app_dir_str);
|
||||
|
||||
// 使用子进程运行clash验证配置
|
||||
let command =
|
||||
app_handle
|
||||
.shell()
|
||||
.sidecar(clash_core.as_str())?
|
||||
.args(["-t", "-d", app_dir_str, "-f", config_path]);
|
||||
let output = command.output().await?;
|
||||
let command = app_handle.shell().sidecar(clash_core.as_str()).map_err(|error| {
|
||||
anyhow::anyhow!("failed to build validation command for core {clash_core:?}: {error:#}")
|
||||
})?;
|
||||
let command = command.args(["-t", "-d", app_dir_str, "-f", config_path]);
|
||||
let output = command.output().await.map_err(|error| {
|
||||
anyhow::anyhow!(
|
||||
"failed to run validation core {clash_core:?} for config {config_path:?} in data directory {}: {error:#}",
|
||||
app_dir.display()
|
||||
)
|
||||
})?;
|
||||
|
||||
let status = &output.status;
|
||||
let stderr = &output.stderr;
|
||||
|
||||
Reference in New Issue
Block a user