Skip to content

Commit

Permalink
🐛 fix settings dependency path
Browse files Browse the repository at this point in the history
  • Loading branch information
friedow committed Oct 27, 2024
1 parent 633bf14 commit b14d729
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions services/index-git-repositories/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version.workspace = true
edition = "2021"

[dependencies]
settings = { path = "../../settings" }
log = { version = "0.4.22", features = ["kv_unstable_serde"] }
simple_logger = { version = "5.0.0", features = [
"colors",
Expand Down
9 changes: 1 addition & 8 deletions services/index-git-repositories/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,8 @@ fn main() {
write_index_file(git_repository_paths);
}

pub fn cache_directory() -> anyhow::Result<String> {
let home_directory = std::env::var("HOME")?;
let cache_in_home = format!("{home_directory}/.cache");
let cache_directory = std::env::var("XDG_CACHE_HOME").unwrap_or(cache_in_home);
Ok(format!("{cache_directory}/centerpiece"))
}

fn write_index_file(git_repository_paths: Vec<&str>) {
let cache_directory_result = cache_directory();
let cache_directory_result = settings::centerpiece_cache_directory();
if let Err(error) = cache_directory_result {
log::error!(
error = log::error!("{:?}", error);
Expand Down

0 comments on commit b14d729

Please sign in to comment.