[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.
This commit is contained in:
parent
20171c59d3
commit
ed25e10d55
1 changed files with 3 additions and 1 deletions
|
|
@ -99,7 +99,9 @@ you can easily write a script that launches the server and writes the file:
|
||||||
(require '[babashka.wait :as wait])
|
(require '[babashka.wait :as wait])
|
||||||
|
|
||||||
(let [nrepl-port (with-open [sock (ServerSocket. 0)] (.getLocalPort sock))
|
(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*))
|
*command-line-args*))
|
||||||
(.redirectOutput ProcessBuilder$Redirect/INHERIT))
|
(.redirectOutput ProcessBuilder$Redirect/INHERIT))
|
||||||
proc (.start pb)]
|
proc (.start pb)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue