Preserve agent setup errors and make UCI credential entry portable

This commit is contained in:
lda committed 2026-10-09 23:53:20 +07:00 Verified
1 parent 6b6050d1c1
commit d2a571b58d
2 files changed
+22 -7

No files matched your search

+7 -1
View File
@@ -19,7 +19,13 @@ async fn main() -> Result<()> {
// Only the long-lived daemon exports: hotplug/enroll invocations stay cheap.
let daemon_config = if let Command::Serve(args) = &cli.command {
Some(config::load_config(global_config.unwrap_or(&args.config))?)
let path = global_config.unwrap_or(&args.config);
// Let serve report its enrollment/setup instructions for a missing file.
if path.exists() {
Some(config::load_config(path)?)
} else {
None
}
} else {
None
};