mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
fix(CORE/dbupdate)): allow to pass MySQL password via env (#13404)
* fix(CORE/dbupdate)): allow to pass MySQL password via env + fixed devContainer override file issue + added authserver dry-run in our CI
This commit is contained in:
@@ -447,9 +447,6 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
|
||||
args.emplace_back("-h" + host);
|
||||
args.emplace_back("-u" + user);
|
||||
|
||||
if (!password.empty())
|
||||
args.emplace_back("-p" + password);
|
||||
|
||||
// Check if we want to connect through ip or socket (Unix only)
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -499,9 +496,14 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
|
||||
if (!database.empty())
|
||||
args.emplace_back(database);
|
||||
|
||||
auto env = boost::process::environment();
|
||||
|
||||
if (!password.empty())
|
||||
env["MYSQL_PWD"]=password;
|
||||
|
||||
// Invokes a mysql process which doesn't leak credentials to logs
|
||||
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
|
||||
"sql.updates", "", true);
|
||||
"sql.updates", "", true, env);
|
||||
|
||||
if (ret != EXIT_SUCCESS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user