Allow format values in exec calls

This commit is contained in:
IamTheFij 2024-11-07 15:39:12 -08:00
parent b9600cb631
commit 4eead212cf

View File

@ -608,8 +608,13 @@ def download_release(
arch_mapping=arch_mapping, arch_mapping=arch_mapping,
) )
format_fields = dict(
asset_name=asset["name"],
**matched_values._asdict(),
)
formatted_files = ( formatted_files = (
[file.format(**matched_values._asdict()) for file in extract_files] [file.format(**format_fields) for file in extract_files]
if extract_files if extract_files
else None else None
) )
@ -621,7 +626,9 @@ def download_release(
) )
if exec: if exec:
check_call(exec.format(asset["name"]), shell=True, cwd=destination) check_call(
exec.format(asset["name"], **format_fields), shell=True, cwd=destination
)
return files return files