Skip to content

Commit 8a58fa3

Browse files
committed
fixup: schedule-by-name
1 parent 275cac0 commit 8a58fa3

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

packages/angular_devkit/architect/src/schedule-by-name.ts

+11-16
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,24 @@ export async function scheduleByName(
4545
const info = description.info as BuilderInfo;
4646
const id = ++_uniqueId;
4747

48+
const message = {
49+
id,
50+
currentDirectory: workspaceRoot,
51+
workspaceRoot: currentDirectory,
52+
info: info,
53+
options: buildOptions,
54+
...(options.target ? { target: options.target } : {}),
55+
};
56+
4857
// Wait for the job to be ready.
4958
if (job.state !== experimental.jobs.JobState.Started) {
5059
stateSubscription = job.outboundBus.subscribe(event => {
5160
if (event.kind === experimental.jobs.JobOutboundMessageKind.Start) {
52-
job.input.next({
53-
id,
54-
currentDirectory: workspaceRoot,
55-
workspaceRoot: currentDirectory,
56-
info: info,
57-
options: buildOptions,
58-
...(options.target ? { target: options.target } : {}),
59-
});
61+
job.input.next(message);
6062
}
6163
});
6264
} else {
63-
job.input.next({
64-
id,
65-
currentDirectory: workspaceRoot,
66-
workspaceRoot: currentDirectory,
67-
info: info,
68-
options: buildOptions,
69-
...(options.target ? { target: options.target } : {}),
70-
});
65+
job.input.next(message);
7166
}
7267

7368
const logChannelSub = job.getChannel<logging.LogEntry>('log').subscribe(entry => {

0 commit comments

Comments
 (0)