What happened?
I add a following line to .gemini/settings.json in my repository,
"policyPaths": [".gemini/policies/tools.toml"],
and create a policy TOML file.
But the policy is ignored.
What did you expect to happen?
Policy TOML files specified in policyPaths is applied.
In my opinion, the following section is the cause.
|
policyPaths: argv.policy, |
I think it needs to be changed as follows:
policyPaths: argv.policy ?? settings.policyPaths,
Client information
Client Information
Note: Some information has been redacted.
> /about
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.30.0-preview.0 │
│ Git Commit 55c628e96 │
│ Model gemini-3-flash-preview │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method Logged in with Google (REDACTED) │
│ Tier Gemini Code Assist Enterprise │
│ GCP Project (REDACTED) │
│ IDE Client VS Code │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Login information
Google Account
Anything else we need to know?
No response
What happened?
I add a following line to
.gemini/settings.jsonin my repository,and create a policy TOML file.
But the policy is ignored.
What did you expect to happen?
Policy TOML files specified in policyPaths is applied.
In my opinion, the following section is the cause.
gemini-cli/packages/cli/src/config/config.ts
Line 690 in 4e11ddb
I think it needs to be changed as follows:
Client information
Client Information
Note: Some information has been redacted.
Login information
Google Account
Anything else we need to know?
No response