fix(wbs): resolve absolute Windows path issue in DomainParityTests for Linux runner compatibility
This commit is contained in:
@@ -24,7 +24,23 @@ namespace QuantEngine.Core.Tests.ParityTests
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
var tempDir = @"C:\Temp\data_feed\Temp";
|
||||
string? tempDir = null;
|
||||
var current = new DirectoryInfo(AppContext.BaseDirectory);
|
||||
while (current != null)
|
||||
{
|
||||
if (Directory.Exists(Path.Combine(current.FullName, ".git")))
|
||||
{
|
||||
tempDir = Path.Combine(current.FullName, "Temp");
|
||||
break;
|
||||
}
|
||||
current = current.Parent;
|
||||
}
|
||||
|
||||
if (tempDir == null)
|
||||
{
|
||||
tempDir = Path.Combine(Directory.GetCurrentDirectory(), "Temp");
|
||||
}
|
||||
|
||||
if (!Directory.Exists(tempDir))
|
||||
{
|
||||
Directory.CreateDirectory(tempDir);
|
||||
|
||||
Reference in New Issue
Block a user