mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-27 14:30:44 -07:00
feat(sandbox): dynamic macOS sandbox expansion and worktree support (#23301)
This commit is contained in:
@@ -58,12 +58,18 @@ function getDisallowedFileReadCommand(testFile: string): {
|
||||
const quotedPath = `"${testFile}"`;
|
||||
switch (shell) {
|
||||
case 'powershell':
|
||||
return { command: `Get-Content ${quotedPath}`, tool: 'Get-Content' };
|
||||
return {
|
||||
command: `powershell -Command "Get-Content ${quotedPath}"`,
|
||||
tool: 'powershell',
|
||||
};
|
||||
case 'cmd':
|
||||
return { command: `type ${quotedPath}`, tool: 'type' };
|
||||
return { command: `cmd /c type ${quotedPath}`, tool: 'cmd' };
|
||||
case 'bash':
|
||||
default:
|
||||
return { command: `cat ${quotedPath}`, tool: 'cat' };
|
||||
return {
|
||||
command: `node -e "console.log(require('fs').readFileSync('${testFile}', 'utf8'))"`,
|
||||
tool: 'node',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user