mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-19 18:37:14 +00:00
More updater fixage
Preserve --dir parameter after updating Allow more than one copy of a command line parameter in MultiMC Linux runner script no longer changes current directory, which allows '--dir .' Fixed unit tests, removed the obsolete one (for some legacy updater command line params that were also removed) [fixes 63127704]
This commit is contained in:
@@ -46,6 +46,11 @@ void UpdateInstaller::setFinishCmd(const std::string& cmd)
|
||||
m_finishCmd = cmd;
|
||||
}
|
||||
|
||||
void UpdateInstaller::setFinishDir(const std::string &dir)
|
||||
{
|
||||
m_finishDir = dir;
|
||||
}
|
||||
|
||||
std::list<std::string> UpdateInstaller::updaterArgs() const
|
||||
{
|
||||
std::list<std::string> args;
|
||||
@@ -63,6 +68,11 @@ std::list<std::string> UpdateInstaller::updaterArgs() const
|
||||
{
|
||||
args.push_back("--dry-run");
|
||||
}
|
||||
if (m_finishDir.size())
|
||||
{
|
||||
args.push_back("--dir");
|
||||
args.push_back(m_finishDir);
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
@@ -420,6 +430,11 @@ void UpdateInstaller::restartMainApp()
|
||||
|
||||
if (!command.empty())
|
||||
{
|
||||
if(!m_finishDir.empty())
|
||||
{
|
||||
args.push_back("--dir");
|
||||
args.push_back(m_finishDir);
|
||||
}
|
||||
LOG(Info,"Starting main application " + command);
|
||||
if(!m_dryRun)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user