Merge pull request #7570 from jonchang/patch-downloaded-resource

resource: fix patching when patch already fetched
This commit is contained in:
Mike McQuaid 2020-05-14 09:57:52 +01:00 committed by GitHub
commit 1a7525ee2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,9 +86,9 @@ class Resource
end
def fetch_patches(skip_downloaded: false)
patches.select!(&:external?)
patches.reject!(&:downloaded?) if skip_downloaded
patches.each(&:fetch)
external_patches = patches.select(&:external?)
external_patches.reject!(&:downloaded?) if skip_downloaded
external_patches.each(&:fetch)
end
def apply_patches