Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ export const layer = Layer.effect(
})

const loadGlobal = Effect.fnUntraced(function* () {
if (Flag.OPENCODE_DISABLE_GLOBAL_CONFIG) return {} as Info
let result: Info = pipe(
{},
mergeDeep(yield* loadFile(path.join(Global.Path.config, "config.json"))),
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/config/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const files = Effect.fn("ConfigPaths.projectFiles")(function* (
export const directories = Effect.fn("ConfigPaths.directories")(function* (directory: string, worktree?: string) {
const afs = yield* AppFileSystem.Service
return unique([
Global.Path.config,
...(Flag.OPENCODE_DISABLE_GLOBAL_CONFIG ? [] : [Global.Path.config]),
...(!Flag.OPENCODE_DISABLE_PROJECT_CONFIG
? yield* afs.up({
targets: [".opencode"],
Expand Down
3 changes: 3 additions & 0 deletions packages/opencode/src/flag/flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ export const Flag = {
get OPENCODE_PURE() {
return truthy("OPENCODE_PURE")
},
get OPENCODE_DISABLE_GLOBAL_CONFIG() {
return truthy("OPENCODE_DISABLE_GLOBAL_CONFIG")
},
get OPENCODE_PLUGIN_META_FILE() {
return process.env["OPENCODE_PLUGIN_META_FILE"]
},
Expand Down
Loading