-
Notifications
You must be signed in to change notification settings - Fork 79
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
Don't set empty ENV values for database dumps #378
Conversation
@kbrock I am fine with this PR, but I am questioning the I have backups/dumps working on every provider we have fully implemented in an automated test suite without this change, so I am curious what is different with your setup that is making this necessary for things to work. |
@@ -249,7 +249,7 @@ def self.runcmd_with_logging(cmd_str, opts, params = {}) | |||
{ | |||
"PGUSER" => opts[:username], | |||
"PGPASSWORD" => opts[:password] | |||
} | |||
}.delete_if { |n, v| v.blank? } |
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.
Do we have delete_blanks
here? I can't remember if that's activesupport or morecore ...
Also, can you fix the code climate/bot comment about the unused argument?
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.
more_core_extensions
is in the gemspec, so it should be good. (I always avoid morecore in gems but in this case, it is good. thnx)
@NickLaMuro I always thought you put BUG when you had a BZ. even if the BZ is an RFE. I changed |
Checked commit kbrock@2d4f718 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Don't set empty ENV values for database dumps (cherry picked from commit 3f6a759)
Hammer backport details:
|
Currently,
PGUSER
andPGPASSWORD
are set in the environment.We want these values to pass through to the subshells
Before
$PGUSER
was overridden by""
if--dbuser
was not passed into the rake taskAfter
The existing
$PGUSER
value is used if there is no--dbuser
passed in, but the new value is used if one is passed in.(same goes for
$PGPASSWORD
)related to: