From 7939de51df542c0fba83477672a15eeace22d888 Mon Sep 17 00:00:00 2001 From: Louis Knight-Webb Date: Thu, 14 Aug 2025 09:58:33 +0100 Subject: [PATCH] Only write dev port file when in dev not prod (vibe-kanban) (#468) * Cleanup script changes for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a * Commit changes from coding agent for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a * Cleanup script changes for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a * Commit changes from coding agent for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a * Cleanup script changes for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a * Commit changes from coding agent for task attempt 4ea260b8-f542-4ca5-97ff-9214a7b1e86a --- crates/executors/src/executors/cursor.rs | 3 +-- crates/server/src/main.rs | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/executors/src/executors/cursor.rs b/crates/executors/src/executors/cursor.rs index ea55aa78..48d3b6f5 100644 --- a/crates/executors/src/executors/cursor.rs +++ b/crates/executors/src/executors/cursor.rs @@ -834,8 +834,7 @@ mod tests { .count(); assert!( patch_count >= 2, - "Expected at least 2 patches, got {}", - patch_count + "Expected at least 2 patches, got {patch_count}" ); } diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs index f52a71bf..d9788e62 100644 --- a/crates/server/src/main.rs +++ b/crates/server/src/main.rs @@ -67,8 +67,10 @@ async fn main() -> Result<(), VibeKanbanError> { let listener = tokio::net::TcpListener::bind(format!("{host}:{port}")).await?; let actual_port = listener.local_addr()?.port(); // get → 53427 (example) - // Write port file for discovery - write_port_file(actual_port).await?; + // Write port file for discovery (dev builds always, release builds only if enabled) + if cfg!(debug_assertions) || std::env::var_os("ENABLE_PORT_FILE").is_some() { + write_port_file(actual_port).await?; + } tracing::info!("Server running on http://{host}:{actual_port}");