wip
parent
b3a576e13d
commit
5aeb4c8d7a
|
@ -0,0 +1,7 @@
|
||||||
|
use crate::prelude::*;
|
||||||
|
|
||||||
|
pub(crate) fn main() -> Result<(), AppError> {
|
||||||
|
let path = app_common::try_config_dir().unwrap().join("server.ini");
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
12
src/main.rs
12
src/main.rs
|
@ -40,13 +40,7 @@ async fn async_main() -> Result<(), AppError> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
"find-nick" => client::find_nick(args).await,
|
"find-nick" => client::find_nick(args).await,
|
||||||
"install" => {
|
"install" => install::main(),
|
||||||
let Some(nickname) = args.next() else {
|
|
||||||
eprintln!("Usage: lookaround install <nickname>");
|
|
||||||
return Err(CliArgError::MissingArgumentValue("install".into()).into());
|
|
||||||
};
|
|
||||||
install::main(&nickname)
|
|
||||||
}
|
|
||||||
"my-ips" => my_ips(),
|
"my-ips" => my_ips(),
|
||||||
"server" => server::server(args).await,
|
"server" => server::server(args).await,
|
||||||
x => Err(CliArgError::UnknownSubcommand(x.to_string()).into()),
|
x => Err(CliArgError::UnknownSubcommand(x.to_string()).into()),
|
||||||
|
@ -54,8 +48,8 @@ async fn async_main() -> Result<(), AppError> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn config() {
|
fn config() {
|
||||||
if let Some(proj_dirs) = directories::ProjectDirs::from("", "ReactorScram", "LookAround") {
|
if let Some(dir) = app_common::try_config_dir() {
|
||||||
println!("Using config dir {:?}", proj_dirs.config_local_dir());
|
println!("config dir = `{dir:?}`");
|
||||||
} else {
|
} else {
|
||||||
println!("Can't detect config dir.");
|
println!("Can't detect config dir.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue