From 4eead212cffe111424d47ffc1048d427038c8457 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Thu, 7 Nov 2024 15:39:12 -0800 Subject: [PATCH] Allow format values in exec calls --- release_gitter.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/release_gitter.py b/release_gitter.py index 6f4a28e..0ac11c2 100755 --- a/release_gitter.py +++ b/release_gitter.py @@ -608,8 +608,13 @@ def download_release( arch_mapping=arch_mapping, ) + format_fields = dict( + asset_name=asset["name"], + **matched_values._asdict(), + ) + formatted_files = ( - [file.format(**matched_values._asdict()) for file in extract_files] + [file.format(**format_fields) for file in extract_files] if extract_files else None ) @@ -621,7 +626,9 @@ def download_release( ) 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