Skip to content

Commit

Permalink
Set default settings to avoid hanging when settings are invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Jan 24, 2024
1 parent bce77da commit 775a7ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/infisical/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ pub struct Client {

impl Client {
pub fn new(settings_input: Option<ClientSettings>) -> Self {
let settings = settings_input.expect("Settings not found or were set improperly.");
// We should allow the user to not provide settings, so they can still use encryption methods that don't require authentication.
let settings = settings_input.unwrap_or(ClientSettings::default());

let c = Self {
auth: ClientAuth {
Expand Down

0 comments on commit 775a7ca

Please sign in to comment.