rm: 没必要保留备份文件了 失败就是失败

This commit is contained in:
秋城落叶
2025-06-19 13:32:14 +08:00
parent a55cd2f999
commit 6ec33b382e

View File

@@ -234,13 +234,12 @@ def process_app(app, base_public_config, install_apps, current_dir=None, skip_co
bsh = rf"sudo '{optool_path}' install -p {destination_dylib} -t '{it}'" bsh = rf"sudo '{optool_path}' install -p {destination_dylib} -t '{it}'"
else: else:
bsh = rf"sudo '{insert_dylib_path}' {destination_dylib} '{backup}' '{it}'" bsh = rf"sudo '{insert_dylib_path}' {destination_dylib} '{backup}' '{it}'"
sh.append(bsh) if not run_command(bsh):
# 执行注入命令
for command in sh:
if not run_command(command):
print(Color.red(f"[错误] 执行注入命令失败: {command}")) print(Color.red(f"[错误] 执行注入命令失败: {command}"))
success = False success = False
else:
run_command(f"sudo rm -rf {backup}")
sign_prefix = ( sign_prefix = (
"/usr/bin/codesign -f -s - --timestamp=none --all-architectures" "/usr/bin/codesign -f -s - --timestamp=none --all-architectures"