A community-maintained Python framework for creating mathematical animations.
Raised an exception if OS is unknown.
Aathish0297f8444942
diff --git a/manim/utils/cfg_subcmds.py b/manim/utils/cfg_subcmds.pyindex 08a0446ca..cf042d6fd 100644--- a/manim/utils/cfg_subcmds.py+++ b/manim/utils/cfg_subcmds.py@@ -184,4 +184,4 @@ Are you sure you want to continue?[y/n]""",to_path = os.path.join(path,'manim.cfg')console.print(f"Exported final Config at {from_path} to {to_path}.")else:- console.print("Could NOT write config.", style="red bold")+ console.print("Aborted...", style="red bold")diff --git a/manim/utils/file_ops.py b/manim/utils/file_ops.pyindex 76033d49f..008cf7686 100644--- a/manim/utils/file_ops.py+++ b/manim/utils/file_ops.py@@ -65,12 +65,13 @@ def open_file(file_path):if current_os == "Windows":os.startfile(file_path)else:- commands = []if current_os == "Linux":- commands.append("xdg-open")+ commands = ["xdg-open"]elif current_os.startswith("CYGWIN"):- commands.append("cygstart")- else: # Assume macOS- commands.append("open")+ commands = ["cygstart"]+ elif current_os == "Darwin":+ commands = ["open"]+ else:+ raise OSError("Unable to identify your operating system...")commands.append(file_path)sp.Popen(commands)\ No newline at end of file