chore: generate
This commit is contained in:
@@ -25,7 +25,9 @@ async function resolveRelativeInstruction(instruction: string): Promise<string[]
|
|||||||
return Filesystem.globUp(instruction, Instance.directory, Instance.worktree).catch(() => [])
|
return Filesystem.globUp(instruction, Instance.directory, Instance.worktree).catch(() => [])
|
||||||
}
|
}
|
||||||
if (!Flag.OPENCODE_CONFIG_DIR) {
|
if (!Flag.OPENCODE_CONFIG_DIR) {
|
||||||
log.warn(`Skipping relative instruction "${instruction}" - no OPENCODE_CONFIG_DIR set while project config is disabled`)
|
log.warn(
|
||||||
|
`Skipping relative instruction "${instruction}" - no OPENCODE_CONFIG_DIR set while project config is disabled`,
|
||||||
|
)
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return Filesystem.globUp(instruction, Flag.OPENCODE_CONFIG_DIR, Flag.OPENCODE_CONFIG_DIR).catch(() => [])
|
return Filesystem.globUp(instruction, Flag.OPENCODE_CONFIG_DIR, Flag.OPENCODE_CONFIG_DIR).catch(() => [])
|
||||||
|
|||||||
@@ -1460,10 +1460,7 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
|
|||||||
// Create a .opencode directory with a command
|
// Create a .opencode directory with a command
|
||||||
const opencodeDir = path.join(dir, ".opencode", "command")
|
const opencodeDir = path.join(dir, ".opencode", "command")
|
||||||
await fs.mkdir(opencodeDir, { recursive: true })
|
await fs.mkdir(opencodeDir, { recursive: true })
|
||||||
await Bun.write(
|
await Bun.write(path.join(opencodeDir, "test-cmd.md"), "# Test Command\nThis is a test command.")
|
||||||
path.join(opencodeDir, "test-cmd.md"),
|
|
||||||
"# Test Command\nThis is a test command.",
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
await Instance.provide({
|
await Instance.provide({
|
||||||
@@ -1471,7 +1468,7 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
|
|||||||
fn: async () => {
|
fn: async () => {
|
||||||
const directories = await Config.directories()
|
const directories = await Config.directories()
|
||||||
// Project .opencode should NOT be in directories list
|
// Project .opencode should NOT be in directories list
|
||||||
const hasProjectOpencode = directories.some(d => d.startsWith(tmp.path))
|
const hasProjectOpencode = directories.some((d) => d.startsWith(tmp.path))
|
||||||
expect(hasProjectOpencode).toBe(false)
|
expect(hasProjectOpencode).toBe(false)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user