Skip to content

Commit e95520e

Browse files
committed
fix: override provided via env var not working
Signed-off-by: Frost Ming <[email protected]>
1 parent 21c5aa9 commit e95520e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

news/3182.bugfix.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug that overrides provided by environment variables do not work.

src/pdm/cli/options.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def non_interactive_option(
513513

514514
override_option = Option(
515515
"--override",
516-
default=os.getenv("PDM_OVERRIDE"),
516+
default=[env] if (env := os.getenv("PDM_OVERRIDE")) else None,
517517
action="append",
518518
help="Use the constraint file in pip-requirements format for overriding. [env var: PDM_OVERRIDE] "
519519
"This option can be used multiple times. "

0 commit comments

Comments
 (0)