resource: fix patching when patch already fetched
This inappropriately modified the shared `patches` variable, meaning an already fetched patch would be removed and therefore not be applied when the resource was staged.
This commit is contained in:
parent
0723df3f86
commit
2ffb87cb03
@ -86,9 +86,12 @@ class Resource
|
||||
end
|
||||
|
||||
def fetch_patches(skip_downloaded: false)
|
||||
patches.select!(&:external?)
|
||||
patches.reject!(&:downloaded?) if skip_downloaded
|
||||
patches.each(&:fetch)
|
||||
patches.each do |p|
|
||||
next unless p.external?
|
||||
next if p.downloaded? && skip_downloaded
|
||||
|
||||
p.fetch
|
||||
end
|
||||
end
|
||||
|
||||
def apply_patches
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user