fix: zig build run debugging double run

This commit is contained in:
FalsePattern 2025-01-30 13:24:33 +01:00
parent 2e6db5ccd3
commit 009c5fa5ed
Signed by: falsepattern
GPG key ID: E930CDEC50C50E23
2 changed files with 9 additions and 4 deletions

View file

@ -17,6 +17,11 @@ Changelog structure reference:
## [Unreleased]
### Fixed
- Debugging
- `zig build run` would run the process twice, one without, one with debugging
## [20.2.1]
### Fixed

View file

@ -48,10 +48,9 @@ class ZigExecConfigBuild(project: Project, factory: ConfigurationFactory): ZigEx
override suspend fun buildCommandLineArgs(debug: Boolean): List<String> {
val result = ArrayList<String>()
result.add("build")
val steps = buildSteps.args
if (debug) {
val steps = if (debug) {
val truncatedSteps = ArrayList<String>()
for (step in steps) {
for (step in buildSteps.args) {
if (step == "run")
continue
@ -60,7 +59,8 @@ class ZigExecConfigBuild(project: Project, factory: ConfigurationFactory): ZigEx
truncatedSteps.add(step)
}
}
truncatedSteps
} else buildSteps.args
result.addAll(steps)
result.addAll(coloredCliFlags(colored.value, debug))
result.addAll(extraArgs.args)