(searchPath string, fileExists func(string) bool, configName string)
| 264 | } |
| 265 | |
| 266 | func findConfigFile(searchPath string, fileExists func(string) bool, configName string) string { |
| 267 | result, ok := tspath.ForEachAncestorDirectory(searchPath, func(ancestor string) (string, bool) { |
| 268 | fullConfigName := tspath.CombinePaths(ancestor, configName) |
| 269 | if fileExists(fullConfigName) { |
| 270 | return fullConfigName, true |
| 271 | } |
| 272 | return fullConfigName, false |
| 273 | }) |
| 274 | if !ok { |
| 275 | return "" |
| 276 | } |
| 277 | return result |
| 278 | } |
| 279 | |
| 280 | func getTraceFromSys(sys tsc.System, locale locale.Locale, testing tsc.CommandLineTesting) func(msg *diagnostics.Message, args ...any) { |
| 281 | return tsc.GetTraceWithWriterFromSys(sys.Writer(), locale, testing) |
no test coverage detected