Check for appsettings.json in TestContent\FactoryOrchestrator (#147)
This commit is contained in:
Родитель
4276e78a76
Коммит
67f2a9e050
|
@ -545,16 +545,9 @@ namespace Microsoft.FactoryOrchestrator.Service
|
|||
{
|
||||
string firstBootStateTaskListPath = _initialTasksDefaultPath;
|
||||
|
||||
ServiceLogger.LogInformation(string.Format(CultureInfo.CurrentCulture, Resources.CheckingForFile, _initialTasksDefaultPath));
|
||||
// Find the TaskLists XML path. Check testcontent directory for wellknown name, fallback to registry
|
||||
if (!File.Exists(firstBootStateTaskListPath))
|
||||
{
|
||||
// Find the TaskLists XML path. Check app settings/registry, fallback to testcontent directory with well known name
|
||||
firstBootStateTaskListPath = (string)(GetAppSetting(_initialTasksPathValue) ?? _initialTasksDefaultPath);
|
||||
if (!firstBootStateTaskListPath.Equals(_initialTasksDefaultPath, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
ServiceLogger.LogInformation(string.Format(CultureInfo.CurrentCulture, Resources.CheckingForFile, firstBootStateTaskListPath));
|
||||
}
|
||||
}
|
||||
|
||||
if (File.Exists(firstBootStateTaskListPath))
|
||||
{
|
||||
|
@ -1749,6 +1742,10 @@ namespace Microsoft.FactoryOrchestrator.Service
|
|||
{
|
||||
builder.AddJsonFile("/etc/FactoryOrchestrator/appsettings.json", optional:true);
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.AddJsonFile(Path.Combine(Environment.ExpandEnvironmentVariables(@"%DATADRIVE%\TestContent\FactoryOrchestrator"), "appsettings.json"), optional: true);
|
||||
}
|
||||
|
||||
Appsettings = builder.Build();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче