We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f830ee4 commit 477cc11Copy full SHA for 477cc11
src/cli.rs
@@ -427,6 +427,17 @@ impl Options {
427
&self.local_staging_path
428
}
429
430
+ /// Path to index directory, ensures that it exists or returns the PathBuf
431
+ pub fn index_dir(&self) -> Option<&PathBuf> {
432
+ if let Some(path) = &self.index_storage_path {
433
+ fs::create_dir_all(path)
434
+ .expect("Should be able to create index directory if it doesn't exist");
435
+ Some(path)
436
+ } else {
437
+ None
438
+ }
439
440
+
441
/// TODO: refactor and document
442
pub fn get_url(&self, mode: Mode) -> Url {
443
let (endpoint, env_var) = match mode {
0 commit comments