mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 16:18:03 +00:00
Make opening robust on Windows, using notepad.exe as a fallback
This commit is contained in:
1 parent
7a89f32a6a
commit
b3b24ebfe6
1 file changed
+4
-1
+4
-1
@@ -37,7 +37,10 @@ def _open_in_editor(path: str) -> None:
|
||||
if editor:
|
||||
subprocess.run([editor, path], check=False)
|
||||
elif sys.platform.startswith("win"):
|
||||
os.startfile(path)
|
||||
try:
|
||||
os.startfile(path)
|
||||
except OSError:
|
||||
subprocess.run(["notepad.exe", path], check=False)
|
||||
elif sys.platform == "darwin":
|
||||
subprocess.run(["open", path], check=False)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user