Skip to content

Commit 1e42407

Browse files
committed
refactor: Allow retry for forge post processing custom task
1 parent 7eadc4c commit 1e42407

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/installer/profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export interface PostProcessOptions extends SpawnJavaOptions {
7272
handler?: (postProcessor: PostProcessor) => Promise<boolean>
7373
onPostProcessFailed?: (proc: PostProcessor, jar: string, classPaths: string, mainClass: string, args: string[], error: unknown) => void
7474
onPostProcessSuccess?: (proc: PostProcessor, jar: string, classPaths: string, mainClass: string, args: string[]) => void
75-
customPostProcessTask?: (processor: PostProcessor[], minecraftFolder: MinecraftFolder, options: PostProcessOptions) => Task<void>
75+
customPostProcessTask?: (processor: PostProcessor[], minecraftFolder: MinecraftFolder, options: PostProcessOptions, originalTask: () => Task<void>) => Task<void>
7676
}
7777

7878
export interface InstallProfileOption extends LibraryOptions, InstallSideOption, PostProcessOptions {
@@ -268,7 +268,7 @@ export function installByProfileTask(installProfile: InstallProfile, minecraft:
268268
await this.yield(new InstallLibraryTask(installRequiredLibs, minecraftFolder, options))
269269

270270
if (options.customPostProcessTask) {
271-
await this.yield(options.customPostProcessTask(processor, minecraftFolder, options))
271+
await this.yield(options.customPostProcessTask(processor, minecraftFolder, options, () => new PostProcessingTask(processor, minecraftFolder, options)))
272272
} else {
273273
await this.yield(new PostProcessingTask(processor, minecraftFolder, options))
274274
}

0 commit comments

Comments
 (0)