(value_in_config_or_env: String, default_value: String)
| 282 | } |
| 283 | |
| 284 | fn check_cache_path(value_in_config_or_env: String, default_value: String) -> String { |
| 285 | let return_value = if !value_in_config_or_env.is_empty() { |
| 286 | value_in_config_or_env |
| 287 | } else if !default_value.is_empty() { |
| 288 | default_value |
| 289 | } else { |
| 290 | read_cache_path() |
| 291 | }; |
| 292 | write_cache_path(return_value.clone()); |
| 293 | return_value |
| 294 | } |
| 295 | |
| 296 | fn write_cache_path(cache_path: String) { |
| 297 | CACHE_PATH.with(|value| { |
no test coverage detected