From 221dedd4807e6c606fbfb764f6640999eb728a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 30 Apr 2024 00:53:07 +0000 Subject: [PATCH] allow user to be omitted, will end up being root --- nexus/analyzer/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nexus/analyzer/src/lib.rs b/nexus/analyzer/src/lib.rs index b844220a70..0642966713 100644 --- a/nexus/analyzer/src/lib.rs +++ b/nexus/analyzer/src/lib.rs @@ -924,7 +924,8 @@ fn parse_db_options(db_type: DbType, with_options: &[SqlOption]) -> anyhow::Resu .context("unable to parse port as valid int")?, user: opts .get("user") - .context("no username specified")? + .cloned() + .unwrap_or_default() .to_string(), password: opts .get("password") @@ -942,8 +943,8 @@ fn parse_db_options(db_type: DbType, with_options: &[SqlOption]) -> anyhow::Resu .unwrap_or_default(), compression: opts .get("compression") - .and_then(|s| s.parse::().ok()) - .unwrap_or_default() as u32, + .and_then(|s| s.parse::().ok()) + .unwrap_or_default(), disable_tls: opts .get("disable_tls") .and_then(|s| s.parse::().ok())