Since some platforms (such as Travis CI) use empty passwords for the database user, passing an empty string for $DB_PASS can result in a TTY prompt, e.g.:
$ DB_USER=someuser DB_PASS="" mysql -u "$DB_USER" -p"$DB_PASS" -e 'show databases;'
Enter password:
This PR rewrites the call to use the longer option names (--user, --password, and --execute) to prevent empty passwords from being interpreted as "please ask me to provide my password in an interactive prompt."
Since some platforms (such as Travis CI) use empty passwords for the database user, passing an empty string for
$DB_PASS
can result in a TTY prompt, e.g.:In a CI environment, this can cause the entire pipeline to hang until cancelled.
This PR rewrites the call to use the longer option names (
--user
,--password
, and--execute
) to prevent empty passwords from being interpreted as "please ask me to provide my password in an interactive prompt."