Skip to content

Commit

Permalink
fix a bug when cd cannot be found
Browse files Browse the repository at this point in the history
  • Loading branch information
iesahin committed Dec 13, 2024
1 parent e290948 commit 3a174ca
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions file/src/remove/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,10 @@ pub fn cmd_remove(output_snd: &XvcOutputSender, xvc_root: &XvcRoot, opts: Remove
} else {
remove_targets
.iter()
.map(|(xe, xp)| {
(
*xe,
XvcCachePath::new(xp, all_content_digests.get(xe).unwrap()).unwrap(),
)
.filter_map(|(xe, xp)| {
all_content_digests
.get(xe)
.map(|cd| (*xe, XvcCachePath::new(xp, cd).unwrap()))
})
.collect::<Vec<(XvcEntity, XvcCachePath)>>()
};
Expand Down

0 comments on commit 3a174ca

Please sign in to comment.