package kaun-board

  1. Overview
  2. Docs

Source file env.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(*---------------------------------------------------------------------------
  Copyright (c) 2026 The Raven authors. All rights reserved.
  SPDX-License-Identifier: ISC
  ---------------------------------------------------------------------------*)

let base_dir () =
  match Sys.getenv_opt "RAVEN_RUNS_DIR" with
  | Some dir -> dir
  | None ->
      let cache =
        match Sys.getenv_opt "XDG_CACHE_HOME" with
        | Some d -> d
        | None -> Filename.concat (Sys.getenv "HOME") ".cache"
      in
      Filename.concat (Filename.concat cache "raven") "runs"