diff --git a/.changeset/ripe-teeth-dig.md b/.changeset/ripe-teeth-dig.md new file mode 100644 index 0000000..5b27151 --- /dev/null +++ b/.changeset/ripe-teeth-dig.md @@ -0,0 +1,8 @@ +--- +"draupnir": major +--- + +Draupnir now must be started with the --draupnir-config option to provide a path +to the config file. Depending on legacy `config` package behaviour was +deprecated in +https://github.com/the-draupnir-project/Draupnir/releases/tag/v2.0.0-beta.8. diff --git a/apps/draupnir/src/config.ts b/apps/draupnir/src/config.ts index b87d90a..e793908 100644 --- a/apps/draupnir/src/config.ts +++ b/apps/draupnir/src/config.ts @@ -301,13 +301,9 @@ function getConfigPath(): { if (mjolnirPath) { return { isDraupnirPath: false, path: mjolnirPath }; } - const path = Config.util.getConfigSources().at(-1)?.name; - if (path === undefined) { - throw new TypeError( - "No configuration path has been found for Draupnir. Use the --draupnir-config option to provide a path to the config." - ); - } - return { isDraupnirPath: false, path }; + throw new TypeError( + "No configuration path has been found for Draupnir. Use the --draupnir-config option to provide a path to the config." + ); } function getConfigMeta(): NonNullable {