From 47fc844ad491f86b603377eafd2f3d38dc4c413e Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 15 Sep 2024 21:41:50 -0500 Subject: [PATCH] use Path.resolve() instead of readlink -f --- fix-rpaths.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fix-rpaths.py b/fix-rpaths.py index 7efbbb7..4386f1b 100755 --- a/fix-rpaths.py +++ b/fix-rpaths.py @@ -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)