MCPcopy Create free account
hub / github.com/SpartanJ/eepp / findCommand

Function findCommand

src/tools/ecode/plugins/debugger/debuggerplugin.cpp:1808–1823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1806}
1807
1808static 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
1825void DebuggerPlugin::runConfig( const std::string& debugger, const std::string& configuration ) {
1826 auto debuggerIt = std::find_if( mDaps.begin(), mDaps.end(), [&debugger]( const DapTool& dap ) {

Callers 1

debuggerBinaryExistsMethod · 0.85

Calls 5

SecondsFunction · 0.85
readAllStdOutMethod · 0.80
createMethod · 0.45
joinMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected