(value_in_config_or_env: String, default_value: String)
| 310 | } |
| 311 | |
| 312 | fn check_cache_path(value_in_config_or_env: String, default_value: String) -> String { |
| 313 | let return_value = if !value_in_config_or_env.is_empty() { |
| 314 | value_in_config_or_env |
| 315 | } else if !default_value.is_empty() { |
| 316 | default_value |
| 317 | } else { |
| 318 | read_cache_path() |
| 319 | }; |
| 320 | write_cache_path(return_value.clone()); |
| 321 | return_value |
| 322 | } |
| 323 | |
| 324 | fn write_cache_path(cache_path: String) { |
| 325 | CACHE_PATH.with(|value| { |
no test coverage detected