File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,16 @@ def postgresql?
1515
1616 def credentials
1717 credential_params = ""
18+ username = @config [ 'username' ] || @config [ 'user' ]
19+
1820 if mysql?
19- username = @config [ 'username' ] || @config [ 'user' ]
2021 credential_params << " -u #{ username } " if username
2122 credential_params << " -p'#{ @config [ 'password' ] } ' " if @config [ 'password' ]
2223 credential_params << " -h #{ @config [ 'host' ] } " if @config [ 'host' ]
2324 credential_params << " -S #{ @config [ 'socket' ] } " if @config [ 'socket' ]
2425 credential_params << " -P #{ @config [ 'port' ] } " if @config [ 'port' ]
2526 elsif postgresql?
26- credential_params << " -U #{ @config [ ' username' ] } " if @config [ ' username' ]
27+ credential_params << " -U #{ username } " if username
2728 credential_params << " -h #{ @config [ 'host' ] } " if @config [ 'host' ]
2829 credential_params << " -p #{ @config [ 'port' ] } " if @config [ 'port' ]
2930 end
You can’t perform that action at this time.
0 commit comments