Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
fix(backend): correctly auto-generate local registry (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Sep 17, 2024
1 parent 9c93562 commit 9a40b8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/backend/toolchain/project/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as glob from "glob";
import { readConfig as readProjectConfig } from "../config/project.ts";
import { ProjectConfig } from "../config/project.ts";
import { loadModule, Module } from "./module.ts";
import { loadRegistry, Registry } from "./registry.ts";
import { loadLocalRegistry, loadRegistry, Registry } from "./registry.ts";
import { ProjectModuleConfig } from "../config/project.ts";
import { validateIdentifier } from "../types/identifiers/mod.ts";
import { Casing } from "../types/identifiers/defs.ts";
Expand Down Expand Up @@ -77,15 +77,15 @@ export async function loadProject(opts: LoadProjectOpts, signal?: AbortSignal):
registries.set("default", defaultRegistry);
}
if (!registries.has("local")) {
const localRegistry = await loadDefaultRegistry(projectRoot, signal);
const localRegistry = await loadLocalRegistry(projectRoot, signal);
registries.set("local", localRegistry);
}

// Validate local registry
const localRegistry = registries.get("local");
if (localRegistry) {
if (!("local" in localRegistry.config)) {
throw new UserError("Registry named `local` is special and must be configured as a local registry.", {
throw new UserError("Registry named `local` is special and must be configured as a local registry type.", {
path: projectConfigPath,
});
}
Expand Down

0 comments on commit 9a40b8c

Please sign in to comment.