Skip to content

Commit

Permalink
refactor(config): check for config file existence before processing s…
Browse files Browse the repository at this point in the history
…ubcommands (#214)
  • Loading branch information
alexpasmantier authored Jan 4, 2025
1 parent 657af5e commit 124c06c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/television/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ async fn main() -> Result<()> {
let args: PostProcessedCli = Cli::parse().into();
debug!("{:?}", args);

let mut config = Config::new()?;

if let Some(command) = args.command {
match command {
cli::Command::ListChannels => {
Expand All @@ -59,7 +61,6 @@ async fn main() -> Result<()> {
}
}

let mut config = Config::new()?;
config.config.tick_rate =
args.tick_rate.unwrap_or(config.config.tick_rate);
config.config.frame_rate =
Expand Down

0 comments on commit 124c06c

Please sign in to comment.