1919import me .itzg .helpers .http .PathOrUriConverter ;
2020import me .itzg .helpers .http .SharedFetchArgs ;
2121import me .itzg .helpers .json .ObjectMappers ;
22+ import org .jetbrains .annotations .NotNull ;
2223import picocli .CommandLine .ArgGroup ;
2324import picocli .CommandLine .Command ;
2425import picocli .CommandLine .ExitCode ;
@@ -208,15 +209,7 @@ public Integer call() throws Exception {
208209 return ExitCode .OK ;
209210 } catch (MissingModsException e ) {
210211
211- final TabularOutput tabOut = new TabularOutput ('=' , " " , "Mod" , "Slug" , "Filename" , "Download page" );
212- for (PathWithInfo info : e .getNeedsDownload ()) {
213- tabOut .addRow (
214- info .getModInfo ().getName (),
215- info .getModInfo ().getSlug (),
216- info .getCurseForgeFile ().getDisplayName (),
217- info .getModInfo ().getLinks ().getWebsiteUrl ()
218- );
219- }
212+ final TabularOutput tabOut = buildTabularOutput (e );
220213
221214 if (needsDownloadFile != null ) {
222215 try (BufferedWriter writer = Files .newBufferedWriter (needsDownloadFile )) {
@@ -240,6 +233,21 @@ public Integer call() throws Exception {
240233
241234 }
242235
236+ @ NotNull
237+ private static TabularOutput buildTabularOutput (MissingModsException e ) {
238+ final TabularOutput tabOut = new TabularOutput ('=' , " " ,
239+ "Mod" , "Filename" , "Download page"
240+ );
241+ for (PathWithInfo info : e .getNeedsDownload ()) {
242+ tabOut .addRow (
243+ info .getModInfo ().getName (),
244+ info .getCurseForgeFile ().getDisplayName (),
245+ info .getModInfo ().getLinks ().getWebsiteUrl () + "/files/" + info .getCurseForgeFile ().getId ()
246+ );
247+ }
248+ return tabOut ;
249+ }
250+
243251 private ExcludeIncludesContent loadExcludeIncludes () throws IOException {
244252 final ExcludeIncludesContent fromFile =
245253 excludeIncludeArgs .excludeIncludeFile != null ? loadExcludeIncludesFile ()
0 commit comments