Skip to content

Commit c5c4b01

Browse files
Fix buildconfig (#20233)
* Fix buildconfig * Fix buildconfig
1 parent 53463d4 commit c5c4b01

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

BuildConfigGen/Program.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,30 @@ private static void MainInner(string? task, string? configs, int? currentSprint,
142142
// 3. Ideally default windows exception will occur and errors reported to WER/watson. I'm not sure this is happening, perhaps DragonFruit is handling the exception
143143
foreach (var t in task!.Split(',', '|'))
144144
{
145+
// If config weren't passed, constract specific config for each task, otherwise we might have problems if first task has 2 configs, but the other 1,0 or diffrenet ones
145146
if (configs == null)
146147
{
147148
var tasks = MakeOptionsReader.ReadMakeOptions(gitRootPath);
148-
var taskMakeOptions = tasks[t];
149-
configs = string.Join('|', taskMakeOptions.Configs);
149+
if (tasks.ContainsKey(t))
150+
{
151+
var taskMakeOptions = tasks[t];
152+
var taskConfigs = string.Join('|', taskMakeOptions.Configs);
153+
MainUpdateTask(t, taskConfigs!, writeUpdates, currentSprint, debugConfGen);
154+
}
155+
else
156+
{
157+
Console.WriteLine($"Config was not found for the task: {t}, skipping");
158+
}
159+
}
160+
else
161+
{
162+
// If configs was passed as arguments, just execute it
163+
MainUpdateTask(t, configs!, writeUpdates, currentSprint, debugConfGen);
150164
}
151165

152-
MainUpdateTask(t, configs!, writeUpdates, currentSprint, debugConfGen);
166+
if (configs != null)
167+
{
168+
}
153169
}
154170
}
155171

make-util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ var processGeneratedTasks = function(baseConfigToolPath, taskList, makeOptions,
17871787
const programPath = getBuildConfigGenerator(baseConfigToolPath);
17881788
const args = [
17891789
"--task",
1790-
tasks
1790+
`"${tasks}"`
17911791
];
17921792

17931793
if (sprintNumber) {

0 commit comments

Comments
 (0)