mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-21 11:30:38 -07:00
fix(cli): expand tilde in policy paths from settings.json (#22772)
This commit is contained in:
@@ -3347,7 +3347,10 @@ describe('Policy Engine Integration in loadCliConfig', () => {
|
||||
|
||||
expect(ServerConfig.createPolicyEngineConfig).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
policyPaths: ['/path/to/policy1.toml', '/path/to/policy2.toml'],
|
||||
policyPaths: [
|
||||
path.normalize('/path/to/policy1.toml'),
|
||||
path.normalize('/path/to/policy2.toml'),
|
||||
],
|
||||
}),
|
||||
expect.anything(),
|
||||
);
|
||||
|
||||
@@ -651,8 +651,12 @@ export async function loadCliConfig(
|
||||
...settings.mcp,
|
||||
allowed: argv.allowedMcpServerNames ?? settings.mcp?.allowed,
|
||||
},
|
||||
policyPaths: argv.policy ?? settings.policyPaths,
|
||||
adminPolicyPaths: argv.adminPolicy ?? settings.adminPolicyPaths,
|
||||
policyPaths: (argv.policy ?? settings.policyPaths)?.map((p) =>
|
||||
resolvePath(p),
|
||||
),
|
||||
adminPolicyPaths: (argv.adminPolicy ?? settings.adminPolicyPaths)?.map(
|
||||
(p) => resolvePath(p),
|
||||
),
|
||||
};
|
||||
|
||||
const { workspacePoliciesDir, policyUpdateConfirmationRequest } =
|
||||
|
||||
Reference in New Issue
Block a user