babashka / babashka

Native, fast starting Clojure interpreter for scripting
https://babashka.org
Eclipse Public License 1.0
4.03k stars 247 forks source link

Global current working directory dynamic var #1277

Closed borkdude closed 2 years ago

borkdude commented 2 years ago

We could have a separate library and namespace for this:

babashka.cwd/*cwd*`

or we could just stick in into babashka.fs/*cwd*.

The idea would be that you could change the current working directory and functions in fs and process would take that into account.

We could also patch clojure core functions, but that would maybe lead to unexpected results later on if we patch things gradually.

borkdude commented 2 years ago

Let's discuss here: https://github.com/babashka/babashka/discussions/1278 I'll update insights from there in the original post.