| 246 | #endif |
| 247 | |
| 248 | static Result writeToolWrapperScript(FileSystem& fs, StringView scriptPath, StringView logPath, StringView toolPath) |
| 249 | { |
| 250 | String scriptContents = StringEncoding::Utf8; |
| 251 | SC_TRY(StringBuilder::format(scriptContents, |
| 252 | "#!/bin/sh\n" |
| 253 | "printf '%s\\n' \"$*\" >> \"{}\"\n" |
| 254 | "exec \"{}\" \"$@\"\n", |
| 255 | logPath, toolPath)); |
| 256 | SC_TRY(fs.writeString(scriptPath, scriptContents.view())); |
| 257 | SC_TRY(fs.chmod(scriptPath, 0755u)); |
| 258 | return Result(true); |
| 259 | } |
| 260 | |
| 261 | static Result writeNoisyToolWrapperScript(FileSystem& fs, StringView scriptPath, StringView logPath, |
| 262 | StringView toolPath, StringView stdOutText, StringView stdErrText) |
no test coverage detected