Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.
Permalink
Browse files Browse the repository at this point in the history
Merge pull request #431 from anchore/dev/nurmi/osoverride_skopeo_update
Ensure only supported os overrides are used in skopeo download comman…
  • Loading branch information
zhill committed Apr 22, 2020
2 parents c2f8862 + 3fa2fd0 commit e417869
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions anchore_engine/clients/skopeo_wrapper.py
Expand Up @@ -110,9 +110,11 @@ def download_image(fulltag, copydir, user=None, pw=None, verify=True, manifest=N
if parent_manifest_data:
for mlist in parent_manifest_data.get('manifests', []):
imageos = mlist.get('platform', {}).get('os', "")
if imageos not in ["", 'linux'] and imageos not in os_overrides:
if imageos not in ["", 'linux']:
# add a windows os override to the list of override attempts, to complete the options that are supported by skopeo
dest_type = 'dir'
os_overrides.insert(0, imageos)
os_overrides.insert(0, "windows")
break

for os_override in os_overrides:
success = False
Expand Down

0 comments on commit e417869

Please sign in to comment.