File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,11 @@ Args parseArgs()
70
70
parser.addOption ( passwordOption );
71
71
72
72
parser.parse ( QCoreApplication::arguments () );
73
- if ( parser.isSet ( helpOption ) )
74
- parser.showHelp (); // exits the app
73
+
74
+ const QStringList posArgs = parser.positionalArguments ();
75
+ if ( parser.isSet ( helpOption ) || posArgs.isEmpty () )
76
+ parser.showHelp (); // exits the ap
77
+
75
78
if ( parser.isSet ( versionOption ) )
76
79
parser.showVersion (); // exits the app
77
80
@@ -80,9 +83,7 @@ Args parseArgs()
80
83
args.pass = parseEnvArg ( parser.value ( passwordOption ), " MERGIN_PASSWORD" );
81
84
args.logFile = parser.value ( logOption );
82
85
83
- const QStringList posArgs = parser.positionalArguments ();
84
- if ( posArgs.isEmpty () )
85
- throw QString ( " command is required positional argument" );
86
+
86
87
87
88
if (!args.logFile .isEmpty ())
88
89
CoreUtils::setLogFilename (args.logFile );
You can’t perform that action at this time.
0 commit comments