Skip to content

Commit

Permalink
Remove 'file not found' print on cli-config
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Jul 23, 2024
1 parent 300a783 commit afa66b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commonMain/kotlin/teksturepako/pakku/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ import teksturepako.pakku.api.platforms.Modrinth
import teksturepako.pakku.cli.cmd.*
import teksturepako.pakku.cli.cmd.Set
import teksturepako.pakku.cli.ui.CliConfig
import teksturepako.pakku.cli.ui.CliThemes
import kotlin.system.exitProcess

fun main(args: Array<String>)
{
println()

// Read 'cli-config.json'
val cliConfig = runBlocking { CliConfig.readToResult().onFailure { println(it.rawMessage) }.get() }
val cliConfig = runBlocking { CliConfig.readToResult() }
.onFailure { error -> debug { println(error.rawMessage) } }
.get()

Pakku().context {
terminal = cliConfig?.toTerminal() ?: Terminal(theme = Theme.Default)
terminal = cliConfig?.toTerminal() ?: Terminal(theme = CliThemes.Default)
}.subcommands(
Init(), Import(), Set(), Add(), Rm(), Status(), Update(), Ls(), Fetch(), Link(), Export(), Diff()
).main(args)
Expand Down

0 comments on commit afa66b8

Please sign in to comment.