(value_in_config_or_env: String, default_value: String)
| 340 | } |
| 341 | |
| 342 | fn check_cache_path(value_in_config_or_env: String, default_value: String) -> String { |
| 343 | let return_value = if !value_in_config_or_env.is_empty() { |
| 344 | value_in_config_or_env |
| 345 | } else if !default_value.is_empty() { |
| 346 | default_value |
| 347 | } else { |
| 348 | read_cache_path() |
| 349 | }; |
| 350 | write_cache_path(return_value.clone()); |
| 351 | return_value |
| 352 | } |
| 353 | |
| 354 | fn write_cache_path(cache_path: String) { |
| 355 | CACHE_PATH.with(|value| { |
no test coverage detected