Skip to content

Commit 14f85ee

Browse files
committed
docs(cli): clarify key-value parsing notes
1 parent d3896ed commit 14f85ee

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎.changeset/cli-key-value-pair-first-separator.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"effect": patch
33
---
44

5-
Fix `Primitive.keyValuePair` in `effect/unstable/cli`, and the `Flag.keyValuePair` and `Param.keyValuePair` built on it, rejecting any pair whose value contains `=`. The pair is now split at the first `=`, so `--env DATABASE_URL=postgres://user:pass@host/db?sslmode=require` and `--env TOKEN=YWJjZA==` parse instead of failing with `Invalid key=value format`. Pairs with no `=`, an empty key, or an empty value are still rejected.
5+
Allow `=` in values parsed by `Primitive.keyValuePair`, `Flag.keyValuePair`, and `Param.keyValuePair` in `effect/unstable/cli`.

‎packages/effect/src/unstable/cli/Primitive.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,7 @@ export const fileSchema = <A>(
822822
*
823823
* **Details**
824824
*
825-
* The pair is split at the first `=`, so the value may itself contain `=`
826-
* characters. Both the key and the value must be non-empty.
825+
* Splits at the first `=`. Keys and values must be non-empty; values may contain `=`.
827826
*
828827
* **Example** (Parsing key-value pairs)
829828
*

0 commit comments

Comments
 (0)