Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-10-19 19:25:35 -06:00
committed by GitHub
10 changed files with 83110 additions and 81 deletions

View File

@@ -228,11 +228,13 @@ BaseLocation DBUpdater<T>::GetBaseLocationType()
template<class T>
bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool)
{
LOG_WARN("sql.updates", "Database \"{}\" does not exist, do you want to create it? [yes (default) / no]: ",
pool.GetConnectionInfo()->database);
LOG_WARN("sql.updates", "Database \"{}\" does not exist", pool.GetConnectionInfo()->database);
if (!sConfigMgr->isDryRun())
const char* interactiveOpt = std::getenv("AC_DISABLE_INTERACTIVE");
if (!sConfigMgr->isDryRun() && std::strcmp(interactiveOpt, "1") != 0)
{
std::cout << "Do you want to create it? [yes (default) / no]:" << std::endl;
std::string answer;
std::getline(std::cin, answer);
if (!answer.empty() && !(answer.substr(0, 1) == "y"))
@@ -559,7 +561,6 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
auto env = boost::process::environment();
// Invokes a mysql process which doesn't leak credentials to logs
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
"sql.updates", "", true, env);