Skip to content

Commit 5fd2473

Browse files
krukowCopilot
andcommitted
fix: use CLJ_CONFIG for Maven local repo in GraalVM native image
bb is a GraalVM native image — JAVA_TOOL_OPTIONS and CLJ_JVM_OPTS have no effect. tools.deps (compiled into bb) uses user.home to find .m2/repository, which resolves to /root inside the awf sandbox. Fix: write a deps.edn with :mvn/local-repo into ~/.deps.clj/ (already mounted) and set CLJ_CONFIG to that directory. tools.deps reads CLJ_CONFIG for user config and finds the :mvn/local-repo override. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c324bf8 commit 5fd2473

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/copilot-setup-steps.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,16 @@ jobs:
7070
fi
7171
# Inside the awf sandbox $HOME is /root, but the mounts map
7272
# /home/runner/.deps.clj and /home/runner/.m2 into the container
73-
# at those same absolute paths. Set env vars so bb's deps.clj
74-
# and the tools JVM use the absolute host paths instead of $HOME.
73+
# at those same absolute paths. bb is a GraalVM native image so
74+
# JAVA_TOOL_OPTIONS has no effect — we must use env vars that
75+
# bb/tools.deps read directly.
76+
#
77+
# DEPS_CLJ_TOOLS_DIR: tells bb's deps.clj where the tools jar is
78+
# CLJ_CONFIG: tells tools.deps where to find user deps.edn (which
79+
# contains :mvn/local-repo pointing to the mounted Maven cache)
80+
echo '{:mvn/local-repo "/home/runner/.m2/repository"}' > "$HOME/.deps.clj/deps.edn"
7581
echo "DEPS_CLJ_TOOLS_DIR=$HOME/.deps.clj" >> "$GITHUB_ENV"
76-
echo "JAVA_TOOL_OPTIONS=-Duser.home=$HOME" >> "$GITHUB_ENV"
82+
echo "CLJ_CONFIG=$HOME/.deps.clj" >> "$GITHUB_ENV"
7783
# Ensure deps directories are readable by any user
7884
chmod -R a+rX ~/.m2/repository ~/.deps.clj 2>/dev/null || true
7985
- name: Install gh-aw extension

.github/workflows/daily-doc-updater.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)