Skip to content

Commit

Permalink
Merge pull request #117 from akirak/ocaml-dotenv
Browse files Browse the repository at this point in the history
Set the environment in .env file
  • Loading branch information
akirak authored Dec 2, 2024
2 parents 5b56d51 + 14ce4d8 commit ea5745b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ocaml/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The default cache path is immutable when odig is installed using Nix
ODIG_CACHE_DIR="$PWD/_build/default/.odig"
# Using _build directory may not be properly allowed for storing user contents
SHERLODOC_DB="$PWD/_build/default/.sherlodoc.marshal"
5 changes: 1 addition & 4 deletions ocaml/.envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
use flake

# Using _build directory may not be properly allowed for storing user contents
export ODIG_CACHE_DIR="$(pwd)/_build/default/.odig"
export SHERLODOC_DB="$(pwd)/_build/default/.sherlodoc.marshal"
dotenv
2 changes: 1 addition & 1 deletion ocaml/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ odig-odoc:
odig odoc

sherlodoc-index: odig-odoc
find "$(odig cache path)/odoc" -name '*.odocl' \
find "${ODIG_CACHE_DIR}/odoc" -name '*.odocl' \
| grep -v '__' \
| xargs sherlodoc index

Expand Down

0 comments on commit ea5745b

Please sign in to comment.