MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / tryResolveHostToolPath

Function tryResolveHostToolPath

Tests/SCBuildTest/SCBuildFixtureTest.cpp:224–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222
223#if SC_PLATFORM_APPLE
224static bool tryResolveHostToolPath(StringView toolName, String& toolPath)
225{
226 Process process;
227 String output = StringEncoding::Utf8;
228 if (not process.exec({"which", toolName}, output) or process.getExitStatus() != 0)
229 {
230 return false;
231 }
232 return toolPath.assign(StringView(output.view()).trimWhiteSpaces());
233}
234
235static bool tryResolveHostToolPath(Span<const StringView> toolNames, String& toolPath)
236{

Callers 1

SCBuildFixtureTestMethod · 0.85

Calls 2

assignMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected