Skip to content

fix(config): normalize Windows env paths in config tokens#32906

Open
dannyward630 wants to merge 1 commit into
anomalyco:devfrom
dannyward630:fix/env-permission-windows-paths
Open

fix(config): normalize Windows env paths in config tokens#32906
dannyward630 wants to merge 1 commit into
anomalyco:devfrom
dannyward630:fix/env-permission-windows-paths

Conversation

@dannyward630

Copy link
Copy Markdown

Issue for this PR

Closes #32695

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Normalizes native Windows path separators in {env:...} config substitutions before JSONC parsing sees them. This keeps permission keys such as {env:MYDIR}/** parseable when MYDIR is set to a Windows path like C:\Users\me\..., while leaving non-path env values unchanged.

Adds a regression test that loads a config with a Windows-style env var inside permission.external_directory and verifies the resulting rule uses forward slashes.

How did you verify your code works?

  • npx --yes bun@1.3.14 test test/config/config.test.ts
  • npx --yes bun@1.3.14 run typecheck

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

{env:VAR} in permission keys expands to native Windows backslashes, producing invalid JSON on Windows

1 participant