memoryd: [honcho] and its keys checked at start, and brokerd's state socket
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
@@ -6,7 +6,8 @@ use std::process::ExitCode;
|
||||
use std::sync::Arc;
|
||||
|
||||
use bxcore::instance;
|
||||
use memoryd::config::Config;
|
||||
use memoryd::config::{Config, ConfigError};
|
||||
use memoryd::honcho::config::RUNBOOK as HONCHO_INVALID;
|
||||
use memoryd::serve;
|
||||
|
||||
const USAGE: &str = "usage: memoryd serve --config <path>";
|
||||
@@ -21,7 +22,11 @@ fn main() -> ExitCode {
|
||||
let config = match Config::load(&path) {
|
||||
Ok(config) => config,
|
||||
Err(e) => {
|
||||
eprintln!("memoryd: {e}\n{START_FAILED}");
|
||||
let pointer = match &e {
|
||||
ConfigError::Read(..) | ConfigError::Parse(..) => START_FAILED,
|
||||
ConfigError::Honcho(..) => HONCHO_INVALID,
|
||||
};
|
||||
eprintln!("memoryd: {e}\n{pointer}");
|
||||
return ExitCode::from(1);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user