From ed25e10d55cbecf118b7b74b83f21e50a5793e38 Mon Sep 17 00:00:00 2001 From: j-cr <41063058+j-cr@users.noreply.github.com> Date: Tue, 18 Aug 2020 12:44:08 +0500 Subject: [PATCH] [doc] set classpath in the nrepl helper script (#539) [skip ci] In the suggested helper script for starting the nrepl server, set the classpath to include `src` and `test` dirs, so that :require works correctly when the script is run from the project root. --- doc/repl.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/repl.md b/doc/repl.md index b6c42584..3f4e5199 100644 --- a/doc/repl.md +++ b/doc/repl.md @@ -99,7 +99,9 @@ you can easily write a script that launches the server and writes the file: (require '[babashka.wait :as wait]) (let [nrepl-port (with-open [sock (ServerSocket. 0)] (.getLocalPort sock)) - pb (doto (ProcessBuilder. (into ["bb" "--nrepl-server" (str nrepl-port)] + cp (str/join File/pathSeparatorChar ["src" "test"]) + pb (doto (ProcessBuilder. (into ["bb" "--nrepl-server" (str nrepl-port) + "--classpath" cp] *command-line-args*)) (.redirectOutput ProcessBuilder$Redirect/INHERIT)) proc (.start pb)]