mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 12:04:56 -07:00
fix(core): ensure global temp directory is always in sandbox allowed paths (#24638)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import type {
|
||||
SandboxManager,
|
||||
SandboxRequest,
|
||||
SandboxedCommand,
|
||||
GlobalSandboxOptions,
|
||||
} from './sandboxManager.js';
|
||||
import { spawn, type ChildProcess } from 'node:child_process';
|
||||
import { EventEmitter } from 'node:events';
|
||||
@@ -52,6 +53,13 @@ class MockSandboxManager implements SandboxManager {
|
||||
getWorkspace(): string {
|
||||
return path.resolve('/workspace');
|
||||
}
|
||||
|
||||
getOptions(): GlobalSandboxOptions | undefined {
|
||||
return {
|
||||
workspace: path.resolve('/workspace'),
|
||||
includeDirectories: [path.resolve('/test/cwd')],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
describe('SandboxedFileSystemService', () => {
|
||||
|
||||
Reference in New Issue
Block a user