| 1806 | } |
| 1807 | |
| 1808 | static std::string findCommand( const std::string& findBinary, const std::string& cmd ) { |
| 1809 | std::string findCmd = findBinary; |
| 1810 | String::replaceAll( findCmd, "${command}", cmd ); |
| 1811 | Process p; |
| 1812 | if ( p.create( findCmd ) ) { |
| 1813 | std::string path; |
| 1814 | p.readAllStdOut( path, Seconds( 5 ) ); |
| 1815 | int retCode = -1; |
| 1816 | p.join( &retCode ); |
| 1817 | if ( retCode == 0 && !path.empty() ) { |
| 1818 | String::trimInPlace( path, '\n' ); |
| 1819 | return path; |
| 1820 | } |
| 1821 | } |
| 1822 | return ""; |
| 1823 | } |
| 1824 | |
| 1825 | void DebuggerPlugin::runConfig( const std::string& debugger, const std::string& configuration ) { |
| 1826 | auto debuggerIt = std::find_if( mDaps.begin(), mDaps.end(), [&debugger]( const DapTool& dap ) { |
no test coverage detected