mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
C#: Teach extractor and autobuilder about new environment variables
This commit is contained in:
@@ -405,22 +405,23 @@ namespace Semmle.Extraction.CSharp
|
||||
|
||||
static string GetCSharpLogDirectory()
|
||||
{
|
||||
string snapshot = Environment.GetEnvironmentVariable("ODASA_SNAPSHOT");
|
||||
string buildErrorDir = Environment.GetEnvironmentVariable("ODASA_BUILD_ERROR_DIR");
|
||||
string traps = Environment.GetEnvironmentVariable("TRAP_FOLDER");
|
||||
var codeQlLogDir = Environment.GetEnvironmentVariable("CODEQL_EXTRACTOR_CSHARP_LOG_DIR");
|
||||
if (!string.IsNullOrEmpty(codeQlLogDir))
|
||||
return codeQlLogDir;
|
||||
|
||||
var snapshot = Environment.GetEnvironmentVariable("ODASA_SNAPSHOT");
|
||||
if (!string.IsNullOrEmpty(snapshot))
|
||||
{
|
||||
return Path.Combine(snapshot, "log");
|
||||
}
|
||||
|
||||
var buildErrorDir = Environment.GetEnvironmentVariable("ODASA_BUILD_ERROR_DIR");
|
||||
if (!string.IsNullOrEmpty(buildErrorDir))
|
||||
{
|
||||
// Used by `qltest`
|
||||
return buildErrorDir;
|
||||
}
|
||||
|
||||
var traps = Environment.GetEnvironmentVariable("TRAP_FOLDER");
|
||||
if (!string.IsNullOrEmpty(traps))
|
||||
{
|
||||
return traps;
|
||||
}
|
||||
|
||||
return Directory.GetCurrentDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user