osxbundle: use arg list instead of a string for signing subprocess call

Fixes #13872
This commit is contained in:
der richter 2024-04-13 12:42:32 +02:00
parent cb6e7c7a55
commit 919a042833
1 changed files with 3 additions and 6 deletions

View File

@ -1,14 +1,11 @@
#!/usr/bin/env python3
import os
import shutil
import sys
import fileinput
import dylib_unhell
import subprocess
from optparse import OptionParser
def sh(command):
return os.popen(command).read().strip()
def bundle_path(binary_name):
return "%s.app" % binary_name
@ -45,8 +42,8 @@ def sign_bundle(binary_name):
resolved_dir = os.path.join(bundle_path(binary_name), dir)
for root, _dirs, files in os.walk(resolved_dir):
for f in files:
sh('codesign --force -s - ' + os.path.join(root, f))
sh('codesign --force -s - ' + bundle_path(binary_name))
subprocess.run(['codesign', '--force', '-s', '-', os.path.join(root, f)])
subprocess.run(['codesign', '--force', '-s', '-', bundle_path(binary_name)])
def bundle_version(src_path):
version = 'UNKNOWN'