Skip to content

Commit

Permalink
Merge pull request #2664 from cloudflare/dominik/improve-error-cache-…
Browse files Browse the repository at this point in the history
…missing

Throw error if the python package disk cache dir is missing.
  • Loading branch information
dom96 authored Sep 9, 2024
2 parents 4faf04b + 0a7c5e7 commit 8bf5a08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/workerd/server/workerd.c++
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,8 @@ public:
kj::Path path = fs->getCurrentPath().eval(pathStr);
kj::Maybe<kj::Own<const kj::Directory>> dir =
fs->getRoot().tryOpenSubdir(path, kj::WriteMode::MODIFY);
server->setPackageDiskCacheRoot(kj::mv(dir));
server->setPackageDiskCacheRoot(
kj::mv(KJ_UNWRAP_OR(dir, CLI_ERROR("package disk cache dir must exist"))));
}

void setPyodideDiskCacheDir(kj::StringPtr pathStr) {
Expand Down

0 comments on commit 8bf5a08

Please sign in to comment.