bugfix: check password variable when deciding to include password parameter
This commit is contained in:
parent
fbc06eff40
commit
636c82eb29
4
lib.js
4
lib.js
|
@ -20,11 +20,11 @@ function parseUri(uri) {
|
|||
}
|
||||
|
||||
function buildMysqlParams(uri) {
|
||||
const { scheme, user, password, host, port, database } = parseUri(uri)
|
||||
const { user, password, host, port, database } = parseUri(uri)
|
||||
return (
|
||||
[
|
||||
user ? `-u ${user}` : '',
|
||||
user ? `-p${password}` : '',
|
||||
password ? `-p${password}` : '',
|
||||
host ? `-h ${host}` : '',
|
||||
port ? `-P ${port}` : '',
|
||||
database ? `${database}` : ''
|
||||
|
|
Loading…
Reference in New Issue