Fix signing failure when no entry to convert to store

zip -d doesn't work when no entry names specified. So if the list of
entry is empty, just skip calling zip -d.

Bug: 218438888

Test: th
Change-Id: Ie4419b9d6fdc2780255c6f12f9f4d35e5c0a7b26
This commit is contained in:
Kelvin Zhang
2022-02-09 16:05:29 -08:00
parent fa91e98985
commit 70876143b5
3 changed files with 7 additions and 6 deletions

View File

@@ -2818,6 +2818,9 @@ def ZipDelete(zip_filename, entries):
"""
if isinstance(entries, str):
entries = [entries]
# If list is empty, nothing to do
if not entries:
return
cmd = ["zip", "-d", zip_filename] + entries
RunAndCheckOutput(cmd)