Treat undefined same as true for isTrustedFolder (#7073)

This commit is contained in:
shrutip90
2025-08-25 19:57:57 -07:00
committed by GitHub
parent b6cca01161
commit 97ce197f38
4 changed files with 39 additions and 5 deletions

View File

@@ -564,7 +564,7 @@ export class Config {
}
setApprovalMode(mode: ApprovalMode): void {
if (!this.isTrustedFolder() && mode !== ApprovalMode.DEFAULT) {
if (this.isTrustedFolder() === false && mode !== ApprovalMode.DEFAULT) {
throw new Error(
'Cannot enable privileged approval modes in an untrusted folder.',
);