From 154b20de8915baedf60d770a4045e3f62e53bca0 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Thu, 2 Feb 2006 16:17:55 +0000 Subject: [PATCH] added fallback to environment variables when a key is not found neither in the XML nor in the mangled name setting something like: $(HOME) now works as expected --- helm/ocaml/registry/helm_registry.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helm/ocaml/registry/helm_registry.ml b/helm/ocaml/registry/helm_registry.ml index 42316a27f..b7b3de11d 100644 --- a/helm/ocaml/registry/helm_registry.ml +++ b/helm/ocaml/registry/helm_registry.ml @@ -151,7 +151,10 @@ let get registry key = let values = (* resulting value *) match registry_values, env_value with | _, Some env -> [env] - | [], None -> raise (Key_not_found key) + | [], None -> + (try + [ Sys.getenv key ] + with Not_found -> raise (Key_not_found key)) | values, None -> values in List.map (interpolate (key :: stack)) values -- 2.39.2