[pbs-devel] [PATCH backup 1/5] pbs-client: use a const for the PBS_REPOSITORY env variable
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Mar 26 15:26:05 CET 2025
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
pbs-client/src/tools/mod.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pbs-client/src/tools/mod.rs b/pbs-client/src/tools/mod.rs
index 3b19df390..a42fa1149 100644
--- a/pbs-client/src/tools/mod.rs
+++ b/pbs-client/src/tools/mod.rs
@@ -29,6 +29,7 @@ pub mod key_source;
const ENV_VAR_PBS_FINGERPRINT: &str = "PBS_FINGERPRINT";
const ENV_VAR_PBS_PASSWORD: &str = "PBS_PASSWORD";
const ENV_VAR_PBS_ENCRYPTION_PASSWORD: &str = "PBS_ENCRYPTION_PASSWORD";
+const ENV_VAR_PBS_REPOSITORY: &str = "PBS_REPOSITORY";
/// Directory with system [credential]s. See systemd-creds(1).
///
@@ -195,7 +196,7 @@ pub fn get_encryption_password() -> Result<Option<Vec<u8>>, Error> {
}
pub fn get_default_repository() -> Option<String> {
- std::env::var("PBS_REPOSITORY").ok()
+ std::env::var(ENV_VAR_PBS_REPOSITORY).ok()
}
pub fn remove_repository_from_value(param: &mut Value) -> Result<BackupRepository, Error> {
--
2.39.5
More information about the pbs-devel
mailing list