()
| 65 | } |
| 66 | |
| 67 | pub fn default_database_url() -> Result<String> { |
| 68 | let path = openshell_core::paths::openshell_state_dir()? |
| 69 | .join("gateway") |
| 70 | .join("openshell.db"); |
| 71 | openshell_core::paths::ensure_parent_dir_restricted(&path)?; |
| 72 | Ok(format!("sqlite:{}", path.display())) |
| 73 | } |
| 74 | |
| 75 | fn default_local_tls_dir() -> Result<PathBuf> { |
| 76 | if let Some(path) = std::env::var_os("OPENSHELL_LOCAL_TLS_DIR") { |
no test coverage detected