C#: Cleanup more files after failed autobuilder attempt

This commit is contained in:
Tom Hvitved
2019-09-26 14:11:31 +02:00
parent 6b28f33713
commit c18d0430de
3 changed files with 29 additions and 7 deletions

View File

@@ -391,7 +391,19 @@ namespace Semmle.Extraction.CSharp
public static string GetCSharpLogPath() =>
Path.Combine(GetCSharpLogDirectory(), "csharp.log");
public static string GetCSharpLogDirectory()
/// <summary>
/// Gets the path to a `csharp.{hash}.txt` file written to by the C# extractor.
/// </summary>
public static string GetCSharpArgsLogPath(string hash) =>
Path.Combine(GetCSharpLogDirectory(), $"csharp.{hash}.txt");
/// <summary>
/// Gets a list of all `csharp.{hash}.txt` files currently written to the log directory.
/// </summary>
public static IEnumerable<string> GetCSharpArgsLogs() =>
Directory.EnumerateFiles(GetCSharpLogDirectory(), "csharp.*.txt");
static string GetCSharpLogDirectory()
{
string snapshot = Environment.GetEnvironmentVariable("ODASA_SNAPSHOT");
string buildErrorDir = Environment.GetEnvironmentVariable("ODASA_BUILD_ERROR_DIR");