Skip to content

Commit

Permalink
Opt: abspath in appdir of uiautomator2 cache
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc committed Apr 19, 2023
1 parent 7ff3e98 commit 2f0382c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def patch_uiautomator2():
So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
appdir = os.path.join(os.path.expanduser('~'), '.uiautomator2')
to:
appdir = os.path.join(__file__, '../../uiautomator2cache')
appdir = os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))
And we also remove minicap installations since emulators doesn't need it.
for url in self.minicap_urls:
Expand All @@ -71,7 +71,7 @@ def patch_uiautomator2():
"""
cache_dir = './toolkit/Lib/site-packages/uiautomator2cache/cache'
init_file = './toolkit/Lib/site-packages/uiautomator2/init.py'
appdir = "os.path.join(__file__, '../../uiautomator2cache')"
appdir = "os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))"

if not os.path.exists(init_file):
logger.info('uiautomator2 is not installed skip patching')
Expand Down

0 comments on commit 2f0382c

Please sign in to comment.