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

Create /root/.lein/ directory in advance #232

Merged
merged 2 commits into from
May 28, 2024

Conversation

alexander-yakushev
Copy link
Contributor

@alexander-yakushev alexander-yakushev commented May 28, 2024

lein repl is currently broken in all Leiningen-based images because Leiningen can't write to /root/.lein directory because it doesn't exist. This PR fixes that by creating the dir in advance.

Current behavior:

docker run -ti --rm clojure:temurin-21-lein-alpine lein repl
java.io.IOException: Permission denied. Please check your access rights for /root/.lein/repl-port

Context: https://clojurians.slack.com/archives/C0PME9N9X/p1716875441293819

@alexander-yakushev alexander-yakushev changed the title Create /root/.lein/ directory in advance, bump tools.deps to 1.11.3.1456 and default Clojure to 1.11.3 Create /root/.lein/ directory in advance May 28, 2024
@cap10morgan
Copy link
Collaborator

This is arguably a lein bug. It relies on the fact that the official installer script downloads the jar file to ~/.lein/self-installs/ and thus that directory already exists when using that installation method. We're not using that installer to have more control over which version we're installing and maybe some other reasons I'm forgetting (perhaps we don't need to?).

But this seems like a fine workaround for now. 👍🏻

@cap10morgan cap10morgan merged commit 22167af into Quantisan:master May 28, 2024
1 check passed
@alexander-yakushev alexander-yakushev deleted the lein branch July 21, 2024 06:23
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

Successfully merging this pull request may close these issues.

2 participants