Skip to content

Commit

Permalink
Throw error if the python package disk cache dir is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
dom96 committed Sep 5, 2024
1 parent 485a7ba commit d89dab5
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 d89dab5

Please sign in to comment.