Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
prevent unintended early return from skipping writing wildcard configs
  • Loading branch information
bcpeinhardt committed Feb 19, 2025
commit 72512e34c096c77665f79cd5a100471e76ab41ad
3 changes: 2 additions & 1 deletion src/main/kotlin/com/coder/gateway/cli/CoderCLIManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ class CoderCLIManager(
val host = deploymentURL.safeHost()
val startBlock = "# --- START CODER JETBRAINS $host"
val endBlock = "# --- END CODER JETBRAINS $host"
val isRemoving = workspaceNames.isEmpty()
val baseArgs =
listOfNotNull(
escape(localBinaryPath.toString()),
Expand Down Expand Up @@ -346,6 +345,8 @@ class CoderCLIManager(
val start = "(\\s*)$startBlock".toRegex().find(contents)
val end = "$endBlock(\\s*)".toRegex().find(contents)

val isRemoving = blockContent.isEmpty()

if (start == null && end == null && isRemoving) {
logger.info("No workspaces and no existing config blocks to remove")
return null
Expand Down