Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
main: supply custom user agent to bodhi client
Browse files Browse the repository at this point in the history
  • Loading branch information
decathorpe committed Jan 31, 2022
1 parent 255fd10 commit 78d14b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub use output::*;
pub mod query;
pub use query::*;

const USER_AGENT: &str = concat!("bodhi-cli v", env!("CARGO_PKG_VERSION"));

/// This function prompts the user for their FAS password.
fn read_password() -> String {
rpassword::prompt_password_stdout("FAS Password: ").expect("Failed to read from console.")
Expand Down Expand Up @@ -117,6 +119,8 @@ async fn main() -> Result<(), String> {
_ => unreachable!(),
};

builder = builder.user_agent(USER_AGENT);

let bodhi = if authenticated {
if args.verbose {
eprintln!("Authenticating with bodhi ...");
Expand Down

0 comments on commit 78d14b0

Please sign in to comment.