@@ -37,7 +37,7 @@ export interface Issue {
37
37
}
38
38
39
39
export type MinecraftIssues = LibraryIssue | MinecraftJarIssue | VersionJsonIssue | AssetIssue | AssetIndexIssue ;
40
- export type InstallIssues = Issue ;
40
+ export type InstallIssues = ProcessorIssue | LibraryIssue ;
41
41
42
42
export interface ProcessorIssue extends Issue {
43
43
role : "processor" ;
@@ -98,7 +98,7 @@ export interface MinecraftIssueReport {
98
98
export interface InstallProfileIssueReport {
99
99
minecraftLocation : MinecraftFolder ;
100
100
installProfile : InstallProfile ;
101
- issues : ProcessorIssue [ ] ;
101
+ issues : InstallIssues [ ] ;
102
102
}
103
103
104
104
async function diagnoseSingleFile ( role : Issue [ "role" ] , file : string , expectedChecksum : string , hint : string ) {
@@ -240,17 +240,24 @@ export function diagnoseInstallTask(installProfile: InstallProfile, minecraftLoc
240
240
installProfile,
241
241
issues : [ ] ,
242
242
} ;
243
- let processors : Processor [ ] ;
244
- try {
245
- processors = resolveProcessors ( "client" , installProfile , mc ) ;
246
- } catch ( e ) {
247
- return report ;
248
- }
243
+ let issues = report . issues ;
244
+ let processors : Processor [ ] = resolveProcessors ( "client" , installProfile , mc ) ;
249
245
250
246
let done = 0 ;
251
- let total = processors . length ;
252
- let issues = report . issues ;
247
+ let total = installProfile . libraries . length + processors . length ;
253
248
c . update ( done , total ) ;
249
+
250
+ await Promise . all ( Version . resolveLibraries ( installProfile . libraries ) . map ( async ( lib ) => {
251
+ let libPath = mc . getLibraryByPath ( lib . download . path ) ;
252
+ let issue : LibraryIssue | undefined = await diagnoseSingleFile ( "library" , libPath , lib . download . sha1 ,
253
+ "Problem on install_profile! Please consider to use Installer.installByProfile to fix." ) ;
254
+ if ( issue ) {
255
+ issue . library = lib ;
256
+ issues . push ( issue ) ;
257
+ }
258
+ c . update ( done += 1 , total , lib . name ) ;
259
+ } ) ) ;
260
+
254
261
for ( let proc of processors ) {
255
262
if ( proc . outputs ) {
256
263
for ( let file in proc . outputs ) {
0 commit comments