Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ccf4ff

Browse files
author
anki-code
committed
Switched realpath to dirname
1 parent 32f8c58 commit 6ccf4ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎xxh_xxh/xxh.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def get_host_info(self):
237237

238238
host = self.url.hostname
239239
host_info_s = """
240-
xxh_home_realpath=$([ ! -x "$(command -v realpath)" ] && readlink -f {host_xxh_home} || realpath -m {host_xxh_home})
240+
xxh_home_realpath=$(dirname {host_xxh_home})/$(basename {host_xxh_home})
241241
xxh_version="dir_not_found"
242242
if [[ -d $xxh_home_realpath ]]; then
243243
xxh_version=$([ "$(ls -A $xxh_home_realpath)" ] && echo "version_not_found" || echo "dir_empty")
@@ -754,7 +754,7 @@ def packages_operations():
754754
shells_dir=(self.local_xxh_home / '.xxh/shells')
755755
))
756756

757-
if p(self.host_xxh_home) == p(f'/'):
757+
if p(self.host_xxh_home).resolve() == p('/'):
758758
self.eeprint("Host xxh home path {host_xxh_home} looks like /. Please check twice!")
759759

760760
host_info = self.get_host_info()

0 commit comments

Comments
 (0)