0xfirefist 1 år sedan
förälder
incheckning
a19f8b4fff
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      fortuna/src/config.rs

+ 4 - 0
fortuna/src/config.rs

@@ -121,6 +121,10 @@ impl Config {
             .ok_or(anyhow!("Could not find chain id {} in the configuration", &chain_id).into())
     }
 
+    // Inject environment variables in the given string. 
+    // It will replace substrings that matches the pattern ${VAR_NAME} with an 
+    // environment variable VAR_NAME. If there is no such env var, it will return 
+    // an error.
     fn inject_env(yaml_content: &str) -> Result<String> {
         let re = Regex::new(r"\$\{([a-zA-Z_][0-9a-zA-Z_]*)\}").unwrap();
         let mut var_error: Option<env::VarError> = None;