From 66cbc8127b8ef7e73f2b23cc4ea2f78f4215e2ea Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 7 Feb 2025 20:39:42 -0500 Subject: [PATCH] Use open to launch actions on macOS Fixes https://gitlab.com/kicad/code/kicad/-/issues/19859 --- scripting/python_manager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripting/python_manager.cpp b/scripting/python_manager.cpp index 306d3dec0a..37aa83f0b4 100644 --- a/scripting/python_manager.cpp +++ b/scripting/python_manager.cpp @@ -115,8 +115,13 @@ void PYTHON_MANAGER::Execute( const wxString& aArgs, } }; +#ifdef __WXMAC__ + wxString cmd = wxString::Format( wxS( "open -a %s --args %s" ), m_interpreterPath, aArgs ); +#else wxString cmd = wxString::Format( wxS( "%s %s" ), m_interpreterPath, aArgs ); - long pid = wxExecute( cmd, wxEXEC_ASYNC, process, aEnv ); +#endif + + long pid = wxExecute( cmd, wxEXEC_ASYNC, process, aEnv ); if( pid == 0 ) {