| 211 | |
| 212 | #if SC_PLATFORM_APPLE or SC_PLATFORM_LINUX |
| 213 | static Result resolveHostToolPath(StringView toolName, String& toolPath) |
| 214 | { |
| 215 | Process process; |
| 216 | String output = StringEncoding::Utf8; |
| 217 | SC_TRY(process.exec({"which", toolName}, output)); |
| 218 | SC_TRY_MSG(process.getExitStatus() == 0, "Cannot locate host tool"); |
| 219 | SC_TRY(toolPath.assign(StringView(output.view()).trimWhiteSpaces())); |
| 220 | return Result(true); |
| 221 | } |
| 222 | |
| 223 | #if SC_PLATFORM_APPLE |
| 224 | static bool tryResolveHostToolPath(StringView toolName, String& toolPath) |
no test coverage detected