Skip to content

Commit

Permalink
Portable setup
Browse files Browse the repository at this point in the history
  • Loading branch information
edocevoli committed Jun 27, 2020
1 parent 5fba790 commit 73a110d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Programs/MiKTeX/initexmf/initexmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,7 @@ void IniTeXMFApp::RegisterOtherRoots()

void IniTeXMFApp::CreatePortableSetup(const PathName& portableRoot)
{
Verbose(T_("Creating portable setup..."));
unique_ptr<Cfg> config(Cfg::Create());
config->PutValue(MIKTEX_CONFIG_SECTION_AUTO, MIKTEX_CONFIG_VALUE_CONFIG, "Portable");
config->PutValue(MIKTEX_CONFIG_SECTION_SETUP, MIKTEX_CONFIG_VALUE_VERSION, VersionNumber(MIKTEX_MAJOR_VERSION, MIKTEX_MINOR_VERSION, MIKTEX_PATCH_VERSION, 0).ToString());
Expand Down Expand Up @@ -2527,7 +2528,7 @@ void IniTeXMFApp::Run(int argc, const char* argv[])
CreatePortableSetup(PathName(portableRoot));
}

if (principal == "setup"
if ((principal == "setup" && !optPortable)
|| !startupConfig.userRoots.empty()
|| !startupConfig.userDataRoot.Empty()
|| !startupConfig.userConfigRoot.Empty()
Expand Down

0 comments on commit 73a110d

Please sign in to comment.