mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix: 🐛 Fix incorrect docs, make exit code 0 instead of 1
This commit is contained in:
parent
641e712272
commit
edbe6e45b2
6 changed files with 20 additions and 17 deletions
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import { loadConfig, watchConfig } from "c12";
|
||||
import { fromZodError } from "zod-validation-error";
|
||||
import { type Config, configValidator } from "./config.type";
|
||||
|
||||
const { config } = await watchConfig({
|
||||
|
|
@ -21,7 +22,9 @@ const { config } = await watchConfig({
|
|||
const parsed = await configValidator.safeParseAsync(config);
|
||||
|
||||
if (!parsed.success) {
|
||||
process.exit(1);
|
||||
console.error("Invalid config file:");
|
||||
console.error(fromZodError(parsed.error).message);
|
||||
process.exit();
|
||||
}
|
||||
|
||||
const exportedConfig = parsed.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue