Closed russmatney closed 4 years ago
@russmatney
You can just put @(promise)
at the bottom of your script. This will block until you terminate the script via SIGINT (Ctrl-C)
Thanks for the positive feedback btw!
This works great! Thanks for the quick response :)
I'm glad I found this post. I also had the same issue.
Thanks a ton for this repo and bababashka at large - it's been a boon for productivity and clojure joy!
In trying to get this filewatcher working, I'm struggling to keep the process alive. It works great (logging file-changes) in the repl, but when run as a bb script, it exits immediately. I've created a simple example repo here.
Is there a typical/recommended approach to keeping bb scripts alive for processes like these? The
babashaka/wait
namespace seems close, but is specific to files and ports at the moment. I expect most usage while developing is that it works against a repl just fine.My use-case is keeping assets always up to date while working on another project - I'd expect to be able to run a
watch
command in the background indefinitely, until interrupting the process viaC-c
.