MCPcopy Create free account
hub / github.com/anomalyco/opencode / isolatedEnv

Function isolatedEnv

packages/opencode/test/lib/cli-process.ts:62–78  ·  view source on GitHub ↗
(home: string, configJson: string)

Source from the content-addressed store, hash-verified

60}
61
62function isolatedEnv(home: string, configJson: string): Record<string, string> {
63 return {
64 OPENCODE_TEST_HOME: home,
65 HOME: home,
66 XDG_CONFIG_HOME: path.join(home, ".config"),
67 XDG_DATA_HOME: path.join(home, ".local/share"),
68 XDG_STATE_HOME: path.join(home, ".local/state"),
69 XDG_CACHE_HOME: path.join(home, ".cache"),
70 OPENCODE_CONFIG_CONTENT: configJson,
71 OPENCODE_DISABLE_PROJECT_CONFIG: "1",
72 OPENCODE_PURE: "1",
73 OPENCODE_DISABLE_AUTOUPDATE: "1",
74 OPENCODE_DISABLE_AUTOCOMPACT: "1",
75 OPENCODE_DISABLE_MODELS_FETCH: "1",
76 OPENCODE_AUTH_CONTENT: "{}",
77 }
78}
79
80export type RunResult = {
81 readonly exitCode: number

Callers 1

withCliFixtureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected