fix: incorrect snapshot path with non-standard src directory (#1768)

This commit is contained in:
jia wei
2023-09-13 13:36:05 +02:00
committed by GitHub
parent e01ef2d8a0
commit 42dc54500c
9 changed files with 115 additions and 8 deletions
+4 -1
View File
@@ -167,7 +167,10 @@ export class ServerContext {
// Load from snapshot if not explicitly requested not to
const loadFromSnapshot = !opts.skipSnapshot;
if (loadFromSnapshot) {
const snapshotDirPath = join(dirname(configPath), "_fresh");
const snapshotDirPath = join(
dirname(fromFileUrl(manifest.baseUrl)),
"_fresh",
);
try {
if ((await Deno.stat(snapshotDirPath)).isDirectory) {
console.log(