(value_in_config_or_env: String, default_value: String)
| 326 | } |
| 327 | |
| 328 | fn check_cache_path(value_in_config_or_env: String, default_value: String) -> String { |
| 329 | let return_value = if !value_in_config_or_env.is_empty() { |
| 330 | value_in_config_or_env |
| 331 | } else if !default_value.is_empty() { |
| 332 | default_value |
| 333 | } else { |
| 334 | read_cache_path() |
| 335 | }; |
| 336 | write_cache_path(return_value.clone()); |
| 337 | return_value |
| 338 | } |
| 339 | |
| 340 | fn write_cache_path(cache_path: String) { |
| 341 | CACHE_PATH.with(|value| { |
no test coverage detected