Skip to content

Commit

Permalink
KSP2 command line tool: exit with exit code
Browse files Browse the repository at this point in the history
(cherry picked from commit e0154ea)
  • Loading branch information
ting-yuan authored and KSP Auto Pick committed Nov 14, 2024
1 parent 59b9a1f commit 7ecd1d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.google.devtools.ksp.processing.kspJvmArgParserHelp
import java.io.File
import java.net.URLClassLoader
import java.util.ServiceLoader
import kotlin.system.exitProcess

class KSPJvmMain {
companion object {
Expand Down Expand Up @@ -45,5 +46,6 @@ internal fun runWithArgs(args: Array<String>, parse: (Array<String>) -> Pair<KSP
)
.toList() as List<SymbolProcessorProvider>

KotlinSymbolProcessing(config, processorProviders, logger).execute()
val exitCode = KotlinSymbolProcessing(config, processorProviders, logger).execute()
exitProcess(exitCode.code)
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class KotlinSymbolProcessing(
val logger: KSPLogger
) {
enum class ExitCode(
@Suppress("UNUSED_PARAMETER") code: Int
val code: Int
) {
OK(0),

Expand Down

0 comments on commit 7ecd1d8

Please sign in to comment.