Skip to content
Permalink
Browse files

Only break cache for non-META6.json dists

See: #2641
  • Loading branch information...
ugexe committed Jan 27, 2019
1 parent 74ccb4c commit 67cf829ff1636272778d424c3e24fc825b06d13c
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/CompUnit/Repository/FileSystem.pm6
@@ -159,6 +159,9 @@ class CompUnit::Repository::FileSystem does CompUnit::Repository::Locally does C
unless ($distribution.meta<provides> && $distribution.meta<provides>{$spec.short-name})
or ($distribution.meta<files> && $distribution.meta<files>{$spec.short-name})
{
# Only break the cache if there is no inclusion authority (i.e. META6.json)
return Empty if $!prefix.child('META6.json').e;

# Break the !distribution cache if we failed to find a match using the cached distribution
# but still found an existing file that matches the $spec.short-name
return Empty unless @extensions.map({ $!prefix.add($spec.short-name.subst(:g, "::", $*SPEC.dir-sep) ~ ".$_") }).first(*.f);

0 comments on commit 67cf829

Please sign in to comment.
You can’t perform that action at this time.