fix(cli): force false for permanent tool approval in Vitest to stabilize snapshots

This commit is contained in:
A.K.M. Adib
2026-04-22 18:41:19 -04:00
parent dcc69bd540
commit c88862839b
+1 -1
View File
@@ -3345,7 +3345,7 @@ export const SETTINGS_SCHEMA_DEFINITIONS: Record<
export function getSettingsSchema(): SettingsSchemaType {
// Force enablePermanentToolApproval to false in Vitest to keep snapshots stable,
// unless explicitly overridden in tests.
if (process.env.VITEST) {
if (process.env['VITEST']) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const schema = JSON.parse(JSON.stringify(SETTINGS_SCHEMA));
schema.security.properties.enablePermanentToolApproval.default = false;