Skip to content

fix(lib): namespace and escape BundlerKey.withEnv entries - #618

Open
eduardomourar wants to merge 1 commit into
open-constructs:mainfrom
eduardomourar:fix/lib-bundler-key-env-entries
Open

eduardomourar wants to merge 1 commit into
open-constructs:mainfrom
eduardomourar:fix/lib-bundler-key-env-entries

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor

Related issue

Fixes #546

Description

withEnv emitted plain k=v parts in the same namespace as add(), so a labelled add() part and a withEnv() entry could collide into the same key. Prefix entries with env= and escape = inside the key and value so neither an add() part nor another env entry can produce the same key.

Checklist

  • I have updated the PR title to match CDKTN's style guide
  • I have run the linter on my code locally
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if applicable
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works if applicable
  • New and existing unit tests pass locally with my changes

withEnv emitted plain k=v parts in the same namespace as add(), so a
labelled add() part and a withEnv() entry could collide into the same
key. Prefix entries with env= and escape = inside the key and value so
neither an add() part nor another env entry can produce the same key.

Fixes open-constructs#546
@eduardomourar
eduardomourar requested a review from a team as a code owner November 14, 2026 19:52
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.

lib: BundlerKey.withEnv entries can collide with add() parts

1 participant