Skip to content

Commit 2760130

Browse files
authored
Merge pull request #908 from ocaml/fix-dune-cache-root-win
Fix DUNE_CACHE_ROOT on Windows
2 parents 9c8cce0 + a20edc7 commit 2760130

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

dist/index.js

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/constants.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,13 @@ export const CYGWIN_ROOT_BIN = path.join(CYGWIN_ROOT, "bin");
6262

6363
export const DUNE_CACHE_ROOT = (() => {
6464
const homeDir = os.homedir();
65-
if (PLATFORM === "windows") {
66-
// [HACK] https://github.com/ocaml/setup-ocaml/pull/55
67-
const duneCacheDir = path.join("D:", "dune");
68-
return duneCacheDir;
69-
}
7065
const xdgCacheHome = process.env.XDG_CACHE_HOME;
7166
const duneCacheDir = xdgCacheHome
7267
? path.join(xdgCacheHome, "dune")
73-
: path.join(homeDir, ".cache", "dune");
68+
: PLATFORM === "windows"
69+
? // [HACK] https://github.com/ocaml/setup-ocaml/pull/55
70+
path.join("D:", "dune")
71+
: path.join(homeDir, ".cache", "dune");
7472
return duneCacheDir;
7573
})();
7674

0 commit comments

Comments
 (0)