mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-17 23:13:03 +08:00
Compare commits
2 Commits
0bad34d7a8
...
6d05d4c7cb
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d05d4c7cb | |||
| 01f4ccaa0e |
@@ -4,6 +4,9 @@ name: Build Test
|
|||||||
# It is triggered when a pull request is opened, synchronized, or reopened against the main branch.
|
# It is triggered when a pull request is opened, synchronized, or reopened against the main branch.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|||||||
@@ -360,6 +360,10 @@ class WebDriverDownloader:
|
|||||||
break
|
break
|
||||||
if not driver_file:
|
if not driver_file:
|
||||||
raise FileNotFoundError(f"未找到 web driver 文件 : {expected_name}")
|
raise FileNotFoundError(f"未找到 web driver 文件 : {expected_name}")
|
||||||
|
# Ensure executable permissions on Unix systems (zipfile
|
||||||
|
# extraction does not preserve the execute bit).
|
||||||
|
if os.name != 'nt':
|
||||||
|
os.chmod(driver_file, 0o755)
|
||||||
progress_callback(100, 100, 0.0, "解压完成")
|
progress_callback(100, 100, 0.0, "解压完成")
|
||||||
self.download_path.unlink()
|
self.download_path.unlink()
|
||||||
self._cleanup(driver_file)
|
self._cleanup(driver_file)
|
||||||
|
|||||||
@@ -111,6 +111,10 @@ class WebDriverManager:
|
|||||||
for driver_info in self.__driver_infos:
|
for driver_info in self.__driver_infos:
|
||||||
driver_path = self._getDriverPath(driver_info)
|
driver_path = self._getDriverPath(driver_info)
|
||||||
if driver_path and driver_path.exists() and driver_path.is_file():
|
if driver_path and driver_path.exists() and driver_path.is_file():
|
||||||
|
# Repair missing execute permission on Unix
|
||||||
|
# (zip-extracted drivers from older versions).
|
||||||
|
if os.name != 'nt' and not os.access(str(driver_path), os.X_OK):
|
||||||
|
os.chmod(str(driver_path), 0o755)
|
||||||
driver_info.driver_path = driver_path
|
driver_info.driver_path = driver_path
|
||||||
driver_info.driver_status = WebDriverStatus.INSTALLED
|
driver_info.driver_status = WebDriverStatus.INSTALLED
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user