Skip to content

Commit 7ce8524

Browse files
authored
Merge pull request #656 from psafont/local-urls
2 parents 8979b62 + 0acdb79 commit 7ce8524

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to
88

99
## [unreleased]
1010

11+
### Fixed
12+
13+
- Ensure cache key creation works with local opam repositories.
14+
1115
## [2.0.12]
1216

1317
### Changed

dist/index.js

Lines changed: 8 additions & 3 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: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup-ocaml/cache.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ async function composeOpamCacheKeys() {
9595

9696
function composeOpamDownloadCacheKeys() {
9797
const repositories = OPAM_REPOSITORIES.map(([, u]) => {
98-
const url = new URL(u);
99-
const urn = path.join(url.hostname, url.pathname);
100-
return urn;
98+
try {
99+
const url = new URL(u);
100+
const urn = path.join(url.hostname, url.pathname);
101+
return urn;
102+
} catch {
103+
return path.resolve(u);
104+
}
101105
}).join("_");
102106
const ocamlVersion = OCAML_COMPILER.toLowerCase().replace(/\W/g, "_");
103107
const { year, month, date } = composeDate();

0 commit comments

Comments
 (0)