Skip to content

Commit

Permalink
fix(rust): require a D-Bus connection only for the serve command
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed May 29, 2024
1 parent 65b1dbd commit f748e65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/agama-server/src/agama-web-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ async fn start_server(address: String, service: Router, ssl_acceptor: SslAccepto
/// Start serving the API.
/// `options`: command-line arguments.
async fn serve_command(args: ServeArgs) -> anyhow::Result<()> {
_ = helpers::init_locale();
init_logging().context("Could not initialize the logger")?;

let (tx, _) = channel(16);
Expand Down Expand Up @@ -377,7 +378,6 @@ impl Termination for CliResult {
#[tokio::main]
async fn main() -> CliResult {
let cli = Cli::parse();
_ = helpers::init_locale();

if let Err(error) = run_command(cli).await {
eprintln!("{:?}", error);
Expand Down

0 comments on commit f748e65

Please sign in to comment.