From aa3370565f08d345e2ad111707f0a741394da9d9 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 5 Mar 2026 09:42:01 +0100 Subject: [PATCH] fix: squint dev server running from wrong directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `bash -c 'cd dir && cmd1 & cmd2'` pattern splits into two command lists — cmd2 runs in the original cwd, not after the cd. Fix by repeating the cd after the `&` in the tmux pane command, and using `exec` in the standalone dev-squint task. --- bb.edn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bb.edn b/bb.edn index 4568fcf..f5439f7 100644 --- a/bb.edn +++ b/bb.edn @@ -86,7 +86,7 @@ :depends [build-theme ensure-npm] :task (let [port (or (some-> (System/getenv "PORT") parse-long) 3002)] (shell {:dir "dev/squint"} - "bash" "-c" (str "npx squint watch & npx vite --port " port)))} + "bash" "-c" (str "npx squint watch & exec npx vite --port " port)))} dev {:doc "Start all dev servers" @@ -121,7 +121,7 @@ (str "bash -c 'cd dev/replicant && npx shadow-cljs watch app'")) (shell "tmux split-window -v -t" session (str "bash -c 'cd dev/squint && npx squint watch" - " & npx vite --port " sport "'")) + " & cd dev/squint && npx vite --port " sport "'")) (shell "tmux select-layout -t" session "tiled") (println (str "Tmux session 'ui-dev' created (base port " base "):")) (println (str " Pane 0: Hiccup → http://localhost:" hport))