fs icon indicating copy to clipboard operation
fs copied to clipboard

When I require this lib as fs,some function doesn't work at all

Open kurt-steiner opened this issue 5 years ago • 1 comments

(require '[me.raynes.fs :as fs])
(fs/chdir "/") 
Execution error (IllegalStateException) at me.raynes.fs/chdir (fs.clj:541).
Can't change/establish root binding of: *cwd* with set

kurt-steiner avatar Mar 22 '20 02:03 kurt-steiner

Try running that inside a with-mutable-cwd block.

(require '[me.raynes.fs :as fs])

(fs/with-mutable-cwd
  (fs/chdir "/"))

According to the docs, chdir "... only works inside of with-mutable-cwd". http://raynes.github.io/fs/me.raynes.fs.html#var-chdir

http://raynes.github.io/fs/me.raynes.fs.html#var-with-mutable-cwd

MicSokoli avatar Dec 10 '20 11:12 MicSokoli