From e7a10cc0eca5c842974afd0e40d3f15959e1e103 Mon Sep 17 00:00:00 2001 From: innocentzero Date: Thu, 15 Feb 2024 12:58:50 +0530 Subject: [PATCH] fix(python): panic on empty pip_binary in config Signed-off-by: innocentzero --- crates/pacdef_core/src/config.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/pacdef_core/src/config.rs b/crates/pacdef_core/src/config.rs index dbcafc1..c7b145f 100644 --- a/crates/pacdef_core/src/config.rs +++ b/crates/pacdef_core/src/config.rs @@ -25,7 +25,7 @@ pub struct Config { #[serde(default)] pub disabled_backends: Vec, /// Choose whether to use pipx instead of pip for python package management - #[serde(default)] + #[serde(default = "pip")] pub pip_binary: String, } @@ -37,6 +37,10 @@ fn aur_helper() -> String { "paru".into() } +fn pip() -> String { + "pip".into() +} + impl Config { /// Load the config from the associated file. ///