From: Stefano Zacchiroli Date: Thu, 2 Feb 2006 16:17:55 +0000 (+0000) Subject: added fallback to environment variables when a key is not found neither in X-Git-Tag: make_still_working~7676 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=154b20de8915baedf60d770a4045e3f62e53bca0;p=helm.git 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 --- 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