use Path.resolve() instead of readlink -f
This commit is contained in:
@@ -4,6 +4,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from os.path import join, basename
|
from os.path import join, basename
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
app_bundle = sys.argv[1]
|
app_bundle = sys.argv[1]
|
||||||
dry_run = '--dry' in sys.argv
|
dry_run = '--dry' in sys.argv
|
||||||
@@ -25,7 +26,7 @@ binaries = []
|
|||||||
for binary in binaries_unfiltered:
|
for binary in binaries_unfiltered:
|
||||||
if binary.endswith('.framework'):
|
if binary.endswith('.framework'):
|
||||||
current_symlink = join(binary, 'Versions/Current/' + basename(binary).split(".")[0])
|
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)
|
binaries.append(current_realpath)
|
||||||
else:
|
else:
|
||||||
binaries.append(binary)
|
binaries.append(binary)
|
||||||
|
Reference in New Issue
Block a user