fix(core): apply safe defaults to all agents (#40316)

This commit is contained in:
Aiden Cline
2026-08-03 17:56:04 -05:00
committed by GitHub
parent 93e8b75cca
commit a4ad17347f
11 changed files with 111 additions and 106 deletions
+3 -2
View File
@@ -13,6 +13,8 @@ const config = path.join(xdgConfig!, app)
const state = path.join(xdgState!, app)
const tmp = path.join(os.tmpdir(), app)
await fs.mkdir(tmp, { recursive: true })
const paths = {
get home() {
return process.env.OPENCODE_TEST_HOME ?? os.homedir()
@@ -24,7 +26,7 @@ const paths = {
cache,
config,
state,
tmp,
tmp: await fs.realpath(tmp),
}
export const Path = paths
@@ -35,7 +37,6 @@ await Promise.all([
fs.mkdir(Path.data, { recursive: true }),
fs.mkdir(Path.config, { recursive: true }),
fs.mkdir(Path.state, { recursive: true }),
fs.mkdir(Path.tmp, { recursive: true }),
fs.mkdir(Path.log, { recursive: true }),
fs.mkdir(Path.bin, { recursive: true }),
fs.mkdir(Path.repos, { recursive: true }),