Skip to content

Commit

Permalink
Merge pull request #34 from kepler16/fix/proper-repl-terminate
Browse files Browse the repository at this point in the history
fix: terminate running repl on shutdown
  • Loading branch information
armed authored Jul 10, 2024
2 parents 50d6361 + 0f28dea commit 582978f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/k16/kmono/repl/deps.clj
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,8 @@
(ansi/print-info "Running clojure...")
(when verbose?
(print-clojure-cmd sdeps-overrides main-opts))
(bp/shell clojure-cmd))))
(let [proc (bp/shell {:continue true} clojure-cmd)]
(doto (Runtime/getRuntime)
(.addShutdownHook (Thread. (fn [] (bp/destroy proc)))))
(bp/check proc)))))

0 comments on commit 582978f

Please sign in to comment.