Merge pull request #13764 from spotlightishere/development

Use perl to resolve symlinks on macOS
This commit is contained in:
Sergio Padrino 2022-02-02 10:13:34 +01:00 committed by GitHub
commit 61ce088db7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
# The least terrible way to resolve a symlink to its real path.
function realpath() {
/usr/bin/python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0";
/usr/bin/perl -e "use Cwd;print Cwd::abs_path(@ARGV[0])" "$0";
}
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"