dotfiles

andersuno
git clone git://git.andersuno.nu/dotfiles.git
Log | Files | Refs | README

commit 778abb13b8e2cbac80b4286949761b3fae4b66ad
parent cfead458139a73cd4b58e8b764c1b4df82ea04c5
Author: Anders Hedman <anders.hedman01@gmail.com>
Date:   Tue,  6 Oct 2026 20:56:55 +0200

chore(opencode): allow go env, go version

Read-only go inspection runs without prompting. Keep go env -w/-u
on ask: they write the persistent go env config, and later rules
win over the go env* allow.

Diffstat:
M.config/opencode/opencode.jsonc | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/.config/opencode/opencode.jsonc b/.config/opencode/opencode.jsonc @@ -140,6 +140,9 @@ { "action": "shell", "resource": "git remote -v", "effect": "allow" }, { "action": "shell", "resource": "git remote get-url*", "effect": "allow" }, { "action": "shell", "resource": "git stash list*", "effect": "allow" }, + // read-only go + { "action": "shell", "resource": "go version*", "effect": "allow" }, + { "action": "shell", "resource": "go env*", "effect": "allow" }, // test / check commands { "action": "shell", "resource": "npm test*", "effect": "allow" }, { "action": "shell", "resource": "npm run lint*", "effect": "allow" }, @@ -164,6 +167,9 @@ { "action": "shell", "resource": "npm run build*", "effect": "ask" }, { "action": "shell", "resource": "cargo build*", "effect": "ask" }, { "action": "shell", "resource": "go build*", "effect": "ask" }, + // go env -w/-u write the persistent go env config (after the go env allow above) + { "action": "shell", "resource": "go env -w*", "effect": "ask" }, + { "action": "shell", "resource": "go env -u*", "effect": "ask" }, { "action": "shell", "resource": "pip install*", "effect": "ask" }, { "action": "shell", "resource": "terraform plan*", "effect": "ask" }, { "action": "shell", "resource": "terraform apply*", "effect": "ask" },