use Path.resolve() instead of readlink -f

This commit is contained in:
2024-09-15 21:41:50 -05:00
parent 68d3ef931a
commit 47fc844ad4

View File

@@ -4,6 +4,7 @@ import subprocess
import sys
from os.path import join, basename
import os
from pathlib import Path
app_bundle = sys.argv[1]
dry_run = '--dry' in sys.argv
@@ -25,7 +26,7 @@ binaries = []
for binary in binaries_unfiltered:
if binary.endswith('.framework'):
current_symlink = join(binary, 'Versions/Current/' + basename(binary).split(".")[0])
current_realpath = subprocess.check_output(["readlink", "-f", current_symlink], text=True).strip()
current_realpath = str(Path(current_symlink).resolve())
binaries.append(current_realpath)
else:
binaries.append(binary)