Make get subcommand debug-build only

This commit is contained in:
Sofia 2020-08-25 21:59:49 +03:00
parent 762ea09b56
commit 3cae13d310
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ pub enum Subcommand {
Init(InitOpt), Init(InitOpt),
Api(ApiOpt), Api(ApiOpt),
Nick(NickOpt), Nick(NickOpt),
#[cfg(debug_assertions)]
Get(GetOpt), Get(GetOpt),
} }

View File

@ -77,6 +77,8 @@ fn from_env(env: EnvOpt) -> Result<(), GenericError> {
} }
Ok(()) Ok(())
} }
#[cfg(debug_assertions)]
Subcommand::Get(opt) => { Subcommand::Get(opt) => {
let config = Config::from_path(&env.config)?; let config = Config::from_path(&env.config)?;
let api = API::new(config.clone()); let api = API::new(config.clone());