21 lines
489 B
Rust
21 lines
489 B
Rust
use snafu::prelude::*;
|
|
|
|
mod action;
|
|
mod api;
|
|
mod config;
|
|
use config::Config;
|
|
mod cli;
|
|
use cli::Cli;
|
|
mod error;
|
|
use crate::error::{Error, ConfigSnafu as ConfigError};
|
|
mod utils;
|
|
|
|
fn main() -> Result<(), Error> {
|
|
let config = Config::from_default_path().context(ConfigError)?;
|
|
let cli = Cli::from_args();
|
|
// TODO: Make ActionExec type return Option<String>? where None means no data was found and so we abort with a proper exit code
|
|
cli.command.exec(&config)?;
|
|
|
|
Ok(())
|
|
}
|