Skip to content

Commit e6b2047

Browse files
cknittclaude
andcommitted
Run opam exec from the repository when building reanalyze
CI's opam switch is local to the repository, and opam exec finds it from the current directory: run from inside the reanalyze clone it failed with "No switch is currently set". opam exec now runs from the repository and changes into the clone itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kbf3gLDo8mBJKpNE25WAwT Signed-off-by: Christoph Knittel <ck@cca.io>
1 parent ea96504 commit e6b2047

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ jobs:
284284
shell: bash
285285
run: |
286286
git -c advice.detachedHead=false clone --quiet --depth 1 --branch v2.27.0 https://github.com/rescript-lang/reanalyze.git "$RUNNER_TEMP/reanalyze"
287-
(cd "$RUNNER_TEMP/reanalyze" && opam exec -- dune build -p reanalyze @install)
287+
# opam exec finds the repository's local switch from the current
288+
# directory, so it changes directory itself.
289+
opam exec -- sh -c 'cd "$RUNNER_TEMP/reanalyze" && dune build -p reanalyze @install'
288290
REANALYZE="$RUNNER_TEMP/reanalyze/_build/install/default/bin/reanalyze.exe" opam exec -- make dead-code
289291
290292
- name: Test playground compiler

0 commit comments

Comments
 (0)