Fork me on GitHub

Is there a way to pass code to be evaluated to "lein repl" ?


The context is that I have a fn "migrate" which I would like to fire off from a dev provision shell script.


@kardan: you could use :repl-options {:init …} maybe? you won’t be directly able to eval something as it would be typed in the repl, but it could work for your scenario, you can run some code PRIOR repl start


A more advanced solution would be something like what I did in Dirac Agent[1]. I start a nREPL, run my init code on a separate thread, which waits for nREPL to fully start, then connects to it and can do some work there over an nREPL session. But this feels like too much for your situation. [1]


@darwin: double posted in general and go some answers there to. Thanks for the tip!