Skip to content

Commit

Permalink
Use the result of re-find, instead of seq-hacking the string.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Hoover authored and stuarthalloway committed Apr 8, 2010
1 parent 10e476f commit 767ee67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/run.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(when-let [run-swank (System/getenv "LABREPL_SWANK")]
(println "Starting swank...")
;; Drop the enclosing double quotes from the environment variable and eval it.
(load-string (if (re-find #"^\".*\"$" run-swank)
(->> run-swank (drop 1) (butlast) (apply str))
(load-string (if-let [found (re-find #"^\"(.*)\"$" run-swank)]
(second found)
run-swank)))

(require 'labrepl)
Expand Down

0 comments on commit 767ee67

Please sign in to comment.