Skip to content

fix: remove dead code in permission builder, fix tilde expansion on Windows#1060

Open
fix2015 wants to merge 1 commit into
EveryInc:mainfrom
fix2015:fix/dead-code-and-home-expansion
Open

fix: remove dead code in permission builder, fix tilde expansion on Windows#1060
fix2015 wants to merge 1 commit into
EveryInc:mainfrom
fix2015:fix/dead-code-and-home-expansion

Conversation

@fix2015

@fix2015 fix2015 commented Jul 3, 2026

Copy link
Copy Markdown

A few things:

  • `applyPermissions` had a duplicate loop at lines 473-481 that rebuilt and overwrote pattern permissions identically to the block at 459-470. Removed the duplicate.
  • `normalizeTool` function was defined but never called anywhere in the codebase. Removed.
  • `expandHome` only checked for `\` (backslash separator) on Windows, but config files and user input typically use `/` (forward slash) even on Windows. Added a check for both separators so tilde expansion works regardless of which slash is used.

…indows

- applyPermissions had a duplicate loop that rebuilt and overwrote
  pattern permissions identically to the block right above it. removed.
- normalizeTool function was defined but never called anywhere. removed.
- expandHome only checked for ~\ (backslash) on Windows but config
  files typically use ~/ (forward slash). now handles both separators.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant