From 230bd749563d5501e40d7382d712c65bebfd1596 Mon Sep 17 00:00:00 2001 From: badgyro <24192094+badgyro@users.noreply.github.com> Date: Sat, 25 Oct 2025 14:37:20 +0200 Subject: [PATCH] Add `CONFY_APP_QUALIFIER` and `CONFY_APP_ORGANIZATION` compile time environmental variables --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a34d4f0..45930c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -468,8 +468,11 @@ pub fn get_configuration_file_path<'a>( app_name: &str, config_name: impl Into>, ) -> Result { + let qualifier_name = option_env!("CONFY_APP_QUALIFIER").unwrap_or("rs"); + let organization_name = option_env!("CONFY_APP_ORGANIZATION").unwrap_or(""); let config_name = config_name.into().unwrap_or("default-config"); - let project = ProjectDirs::from("rs", "", app_name).ok_or_else(|| { + + let project = ProjectDirs::from(qualifier_name, organization_name, app_name).ok_or_else(|| { ConfyError::BadConfigDirectory("could not determine home directory path".to_string()) })?;