Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
avoid writing to modules that have no repos anyway
Browse files Browse the repository at this point in the history
fix #157
  • Loading branch information
aep committed Mar 7, 2021
1 parent 06f20e1 commit f5a696a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/repos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ pub struct Index {
}

pub fn index(project: &project::Config) -> HashSet<PathBuf> {

// shortcut so we dont try to write to read only modules such when installed as distro pkg
if project.repos.len() == 0 {
return HashSet::new();
}

let td = super::project::target_dir();
let cachepath = td.join("repos").join("index");
let index = if let Some(index) = cache("zz.toml", &cachepath) {
Expand Down

0 comments on commit f5a696a

Please sign in to comment.