summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-08-13 20:03:44 -0500
committerGitHub <[email protected]>2025-08-13 20:03:44 -0500
commitbb4b24a05fed931f4fb3d8654e193091767681bd (patch)
tree41ac844c955d6aa9877c73ec47b4368cde8e3e91 /packages/web/src
parente789abec79f7a98b88e0462915d0b7a7d015db26 (diff)
downloadopencode-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.mdx10
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")
}
}
}