Merge pull request #3537 from rbutoi/argv0

Use argv[0] to print program name on a CLI error.
This commit is contained in:
Petr Mrázek 2021-02-07 02:21:25 +01:00 committed by GitHub
commit ba4a1a68bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,8 +207,9 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
catch (const ParsingError &e)
{
std::cerr << "CommandLineError: " << e.what() << std::endl;
std::cerr << "Try '%1 -h' to get help on MultiMC's command line parameters."
<< std::endl;
if(argc > 0)
std::cerr << "Try '" << argv[0] << " -h' to get help on MultiMC's command line parameters."
<< std::endl;
m_status = MultiMC::Failed;
return;
}