diff options
| author | Aiden Cline <[email protected]> | 2025-08-13 20:03:44 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-13 20:03:44 -0500 |
| commit | bb4b24a05fed931f4fb3d8654e193091767681bd (patch) | |
| tree | 41ac844c955d6aa9877c73ec47b4368cde8e3e91 /packages/web/src | |
| parent | e789abec79f7a98b88e0462915d0b7a7d015db26 (diff) | |
| download | opencode-bb4b24a05fed931f4fb3d8654e193091767681bd.tar.gz opencode-bb4b24a05fed931f4fb3d8654e193091767681bd.zip | |
docs: fix bad example (#1913)
Diffstat (limited to 'packages/web/src')
| -rw-r--r-- | packages/web/src/content/docs/docs/plugins.mdx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/packages/web/src/content/docs/docs/plugins.mdx b/packages/web/src/content/docs/docs/plugins.mdx index 08c697a62..22c78b0b3 100644 --- a/packages/web/src/content/docs/docs/plugins.mdx +++ b/packages/web/src/content/docs/docs/plugins.mdx @@ -93,13 +93,9 @@ Prevent opencode from reading `.env` files: ```javascript title=".opencode/plugin/env-protection.js" export const EnvProtection = async ({ client, $ }) => { return { - tool: { - execute: { - before: async (input, output) => { - if (input.tool === "read" && output.args.filePath.includes(".env")) { - throw new Error("Do not read .env files") - } - } + "tool.execute.before": async (input, output) => { + if (input.tool === "read" && output.args.filePath.includes(".env")) { + throw new Error("Do not read .env files") } } } |
