mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 04:16:57 +03: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:
parent
a64eebf8eb
commit
0dcf694c87
14 changed files with 47 additions and 98 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue