Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nesteiner opened this issue Mar 22, 2020 · 1 comment
Open

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

nesteiner opened this issue Mar 22, 2020 · 1 comment

Comments

@nesteiner
Copy link

(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
@MicSokoli
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants