diff --git a/crates/factor-sqlite/src/runtime_config/spin.rs b/crates/factor-sqlite/src/runtime_config/spin.rs index 3bc2452f0..a98387df1 100644 --- a/crates/factor-sqlite/src/runtime_config/spin.rs +++ b/crates/factor-sqlite/src/runtime_config/spin.rs @@ -30,21 +30,10 @@ impl RuntimeConfigResolver { /// This takes as arguments: /// * the directory to use as the default location for SQLite databases. /// Usually this will be the path to the `.spin` state directory. - /// * the *absolute* path to the directory from which relative paths to + /// * the path to the directory from which relative paths to /// local SQLite databases are resolved. (this should most likely be the /// path to the runtime-config file or the current working dir). - /// - /// Panics if either `default_database_dir` or `local_database_dir` are not - /// absolute paths. pub fn new(default_database_dir: PathBuf, local_database_dir: PathBuf) -> Self { - assert!( - default_database_dir.is_absolute(), - "default_database_dir must be an absolute path" - ); - assert!( - local_database_dir.is_absolute(), - "local_database_dir must be an absolute path" - ); Self { default_database_dir, local_database_dir, diff --git a/crates/runtime-config/src/lib.rs b/crates/runtime-config/src/lib.rs index 0ab315d4b..12f40c750 100644 --- a/crates/runtime-config/src/lib.rs +++ b/crates/runtime-config/src/lib.rs @@ -214,8 +214,6 @@ fn sqlite_config_resolver( state_dir: Option<&str>, ) -> anyhow::Result { let default_database_dir = PathBuf::from(state_dir.unwrap_or(DEFAULT_STATE_DIR)); - let default_database_dir = std::path::absolute(default_database_dir) - .context("failed to make default database directory absolute")?; let local_database_dir = std::env::current_dir().context("failed to get current working directory")?; Ok(sqlite::RuntimeConfigResolver::new(