Repository navigation
Commit a1e55fe
committed
fix(opencode): skip env-var prefixes in shell permission pattern matching
The source() function returned the full node text including variable_assignment
children (e.g. "GOFLAGS=-mod=vendor go test"). This caused permission rules
like "go *": "allow" to never match commands with env-var prefixes.
Now source() filters out variable_assignment children before constructing the
pattern text, so "GOFLAGS=-mod=vendor go test ./..." correctly matches "go *".
Closes anomalyco#141101 parent e5cf3ad commit a1e55fe
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
124 | 132 | | |
125 | 133 | | |
126 | 134 | | |
| |||
0 commit comments