Skip to content

Commit f501013

Browse files
committed
Fix autoinstall on mac
1 parent 28bea50 commit f501013

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ddcz/tests/test_ui/cases.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,13 @@ def download_and_extract_chromedriver(url, download_path):
248248
.lower()
249249
== "y"
250250
):
251-
os.rename(extracted_chromedriver_path, chromedriver_path)
251+
try:
252+
os.rename(extracted_chromedriver_path, chromedriver_path)
253+
except PermissionError:
254+
print(
255+
"Insufficient permissions to move chromedriver from {extracted_chromedriver_path} {chromedriver_path}; provide password to move with sudo."
256+
)
257+
os.system(f"sudo mv {extracted_chromedriver_path} {chromedriver_path}")
252258
os.chmod(chromedriver_path, 755)
253259
else:
254260
print(

0 commit comments

Comments
 (0)