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?
15
15
16
16
def credentials
17
17
credential_params = ""
18
+ username = @config [ 'username' ] || @config [ 'user' ]
19
+
18
20
if mysql?
19
- username = @config [ 'username' ] || @config [ 'user' ]
20
21
credential_params << " -u #{ username } " if username
21
22
credential_params << " -p'#{ @config [ 'password' ] } ' " if @config [ 'password' ]
22
23
credential_params << " -h #{ @config [ 'host' ] } " if @config [ 'host' ]
23
24
credential_params << " -S #{ @config [ 'socket' ] } " if @config [ 'socket' ]
24
25
credential_params << " -P #{ @config [ 'port' ] } " if @config [ 'port' ]
25
26
elsif postgresql?
26
- credential_params << " -U #{ @config [ ' username' ] } " if @config [ ' username' ]
27
+ credential_params << " -U #{ username } " if username
27
28
credential_params << " -h #{ @config [ 'host' ] } " if @config [ 'host' ]
28
29
credential_params << " -p #{ @config [ 'port' ] } " if @config [ 'port' ]
29
30
end
You can’t perform that action at this time.
0 commit comments