mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-20 02:51:55 -07:00
fix: Usage of folder trust config flags in FileCommandLoader (#10837)
This commit is contained in:
@@ -64,11 +64,11 @@ const TomlCommandDefSchema = z.object({
|
||||
export class FileCommandLoader implements ICommandLoader {
|
||||
private readonly projectRoot: string;
|
||||
private readonly folderTrustEnabled: boolean;
|
||||
private readonly folderTrust: boolean;
|
||||
private readonly isTrustedFolder: boolean;
|
||||
|
||||
constructor(private readonly config: Config | null) {
|
||||
this.folderTrustEnabled = !!config?.getFolderTrustFeature();
|
||||
this.folderTrust = !!config?.getFolderTrust();
|
||||
this.folderTrustEnabled = !!config?.getFolderTrust();
|
||||
this.isTrustedFolder = !!config?.isTrustedFolder();
|
||||
this.projectRoot = config?.getProjectRoot() || process.cwd();
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ export class FileCommandLoader implements ICommandLoader {
|
||||
cwd: dirInfo.path,
|
||||
});
|
||||
|
||||
if (this.folderTrustEnabled && !this.folderTrust) {
|
||||
if (this.folderTrustEnabled && !this.isTrustedFolder) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user