Skip to content

Commit

Permalink
fix: override provided via env var not working
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Oct 18, 2024
1 parent 21c5aa9 commit e95520e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/3182.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug that overrides provided by environment variables do not work.
2 changes: 1 addition & 1 deletion src/pdm/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def non_interactive_option(

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

0 comments on commit e95520e

Please sign in to comment.