Skip to content

Commit

Permalink
Call the after methods, possibly async
Browse files Browse the repository at this point in the history
  • Loading branch information
JrMasterModelBuilder committed Oct 15, 2023
1 parent 33c8f19 commit f2632ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/projector/otto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export interface IFilePatch {
/**
* Run after all patches.
*/
after: () => void;
after: () => Promise<void> | void;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/projector/otto/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ export class ProjectorOttoWindows extends ProjectorOtto {
if (!foundXtras) {
throw new Error(`Failed to locate: ${xtrasName}`);
}

await Promise.all(patches.map(async p => p.after()));
}

/**
Expand Down

0 comments on commit f2632ad

Please sign in to comment.