fix: enforce plugin config schemas (#1272) (thanks @thewilloftheshadow)
Co-authored-by: thewilloftheshadow <thewilloftheshadow@users.noreply.github.com>
This commit is contained in:
committed by
Peter Steinberger
parent
48f733e4b3
commit
2f6d5805de
@@ -6,7 +6,7 @@ import {
|
||||
loadConfig,
|
||||
readConfigFileSnapshot,
|
||||
resolveGatewayPort,
|
||||
validateConfigObject,
|
||||
validateConfigObjectWithPlugins,
|
||||
writeConfigFile,
|
||||
} from "../config/config.js";
|
||||
import { runCommandWithTimeout } from "../process/exec.js";
|
||||
@@ -244,7 +244,7 @@ export async function runGmailSetup(opts: GmailSetupOptions) {
|
||||
},
|
||||
};
|
||||
|
||||
const validated = validateConfigObject(nextConfig);
|
||||
const validated = validateConfigObjectWithPlugins(nextConfig);
|
||||
if (!validated.ok) {
|
||||
throw new Error(`Config validation failed: ${validated.issues[0]?.message ?? "invalid"}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user