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

System deps.edn should be extracted on tools install #106

Closed
cursive-ide opened this issue Jun 28, 2023 · 3 comments
Closed

System deps.edn should be extracted on tools install #106

cursive-ide opened this issue Jun 28, 2023 · 3 comments

Comments

@cursive-ide
Copy link
Contributor

Currently, deps.clj detects whether the Clojure tools have been installed, and if not, downloads and installs them. If a client later uses the API to obtain the config paths, the first file in the list (the system deps) will not exist. This file exists in the tools distribution jar, but should be extracted on install. The standard Clojure tools do have this file available in their installation directory.

@borkdude
Copy link
Owner

borkdude commented Jul 7, 2023

@cursive-ide Isn't that what this piece of code is doing?

(let [config-deps-edn (io/file config-dir "deps.edn")
          example-deps-edn (io/file install-dir "example-deps.edn")]
      (when (and install-dir
                 (not (.exists config-deps-edn))
                 (.exists example-deps-edn))
        (io/copy example-deps-edn config-deps-edn)))

@borkdude
Copy link
Owner

borkdude commented Jul 7, 2023

Ah, I didn't read the "on tools install" part

@borkdude
Copy link
Owner

borkdude commented Jul 7, 2023

Now the clojure-tools-install! requires one extra argument: :config-dir. When passed, it will extract the system deps.edn and tools dir tools.edn into that directory.

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