-
-
Notifications
You must be signed in to change notification settings - Fork 658
feat: override PAGER
with DDEV_PAGER
env variable, for #6842
#6900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -71,7 +71,7 @@ services: | |||
- POSTGRES_PASSWORD=db | |||
- POSTGRES_USER=db | |||
- POSTGRES_DB=db | |||
- PAGER=less -SFX | |||
- PAGER=${DDEV_PAGER-less -SFX} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentional syntax; the below syntax will not work for an empty string: export DDEV_PAGER=
, because it will use the default less -SFX
instead of an empty string:
- PAGER=${DDEV_PAGER-less -SFX} | |
- PAGER=${DDEV_PAGER:-less -SFX} # this will not work as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That fix is right.
Download the artifacts for this pull request:
See Testing a PR. |
a5f32f4
to
c4f0897
Compare
It's a good question. We do have other things that can probably be overridden, but DDEV is usually overriding them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me, and will make me happy enough. Not sure my use-case is that important.
I guess the question would be, should the default be with-pager or without-pager? I guess we can find out whether we get pushback on the default pager.
Yes, let's use with-pager for now, otherwise we won't get any feedback. |
You'd get feedback from @tyler36 ! :) |
The Issue
We don't have a quick and easy way to override
PAGER
variable in theweb
anddb
containers.How This PR Solves The Issue
Adds an optional environment variable
DDEV_PAGER
.I'm unsure where to add information about DDEV_PAGER in the docs (should we?).
The section on Environment Variables Provided is not the right place, as it covers variables inside the container, whereas
DDEV_PAGER
is used outside the container.Manual Testing Instructions
Automated Testing Overview
Release/Deployment Notes