Skip to content

Commit 419a992

Browse files
authoredSep 10, 2022
show mod count in list command (#64)
* show mod count in list command * create variable for installed slugs
1 parent 16f48d9 commit 419a992

File tree

1 file changed

+4
-2
lines changed
  • pacmc-cli/src/commonMain/kotlin/net/axay/pacmc/cli/commands

1 file changed

+4
-2
lines changed
 

‎pacmc-cli/src/commonMain/kotlin/net/axay/pacmc/cli/commands/ListCommand.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,16 @@ class ListCommand : CliktCommand(
4343
return@launchJob
4444
}
4545

46-
terminal.println("The archive '$archiveName' contains the following content:")
46+
val installedSlugs = archive.getInstalled()
47+
48+
terminal.println("The archive '$archiveName' contains the following content (${installedSlugs.size} mods):")
4749

4850
val installed = mutableListOf<Pair<String, String>>()
4951
val installedDependencies = mutableListOf<Pair<String, String>>()
5052
val installedMutex = Mutex()
5153

5254
coroutineScope {
53-
archive.getInstalled().forEach { project ->
55+
installedSlugs.forEach { project ->
5456
launch {
5557
val projectLine = async {
5658
buildString {

0 commit comments

Comments
 (0)