fix(package): ensure `electron-packager` throws if fails (#3136)
This commit is contained in:
Родитель
6a118c6c9c
Коммит
4c813a7905
|
@ -165,11 +165,6 @@ export const listrPackage = ({
|
|||
|
||||
task.output = 'Determining targets...';
|
||||
|
||||
let provideTargets: (targets: TargetDefinition[]) => void;
|
||||
const targetsPromise = new Promise<InternalTargetDefinition[]>((resolve) => {
|
||||
provideTargets = resolve;
|
||||
});
|
||||
|
||||
type StepDoneSignalMap = Map<string, (() => void)[]>;
|
||||
const signalCopyDone: StepDoneSignalMap = new Map();
|
||||
const signalRebuildDone: StepDoneSignalMap = new Map();
|
||||
|
@ -186,6 +181,12 @@ export const listrPackage = ({
|
|||
});
|
||||
};
|
||||
|
||||
let provideTargets: (targets: TargetDefinition[]) => void;
|
||||
const targetsPromise = new Promise<InternalTargetDefinition[]>((resolve, reject) => {
|
||||
provideTargets = resolve;
|
||||
rejects.push(reject);
|
||||
});
|
||||
|
||||
const rebuildTasks = new Map<string, Promise<ForgeListrTask<never>>[]>();
|
||||
const signalRebuildStart = new Map<string, ((task: ForgeListrTask<never>) => void)[]>();
|
||||
|
||||
|
@ -309,7 +310,9 @@ export const listrPackage = ({
|
|||
// rejects is populated by the reject handlers for every
|
||||
// signal based promise in every subtask
|
||||
ctx.packagerPromise.catch((err) => {
|
||||
for (const reject of rejects) reject(err);
|
||||
for (const reject of rejects) {
|
||||
reject(err);
|
||||
}
|
||||
});
|
||||
|
||||
const targets = await targetsPromise;
|
||||
|
|
Загрузка…
Ссылка в новой задаче