|
|
@@ -119,7 +119,9 @@ export const Plugin = define({
|
|
|
function expandPermissions(rules: PermissionV2.Ruleset, home: string): PermissionV2.Ruleset {
|
|
|
// Expand only resources tools resolve as filesystem paths. Bash resources are raw shell text:
|
|
|
// rewriting `$HOME/private/**` would miss `$HOME/private/key`, and safe expansion needs shell-aware parsing.
|
|
|
- return rules.map((rule) => (isPathAction(rule.action) ? { ...rule, resource: expandHome(rule.resource, home) } : rule))
|
|
|
+ return rules.map((rule) =>
|
|
|
+ isPathAction(rule.action) ? { ...rule, resource: expandHome(rule.resource, home) } : rule,
|
|
|
+ )
|
|
|
}
|
|
|
|
|
|
function isPathAction(action: string): action is PathAction {
|