I’m trying to use Clojure to write a quick little script but my program won’t exit for some reason.
(ns benchmark.core (:require [clojure.java.shell :refer :all]) (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (let [command "ls" args "-al" program-run (sh command args)] (println (:out program-run))))
The weird thing is that In the REPL (Emacs/CIDER) I can run
(-main) and it’ll print the output and then go back to waiting for the next user provided command to run. But when I run it with
lein run it’ll just hang after printing.
However, I’ve confirmed that a simple
(println "Hello World") exits properly
I’m not even sure how to go about debugging this. Any input would be helpful