Skip to content

Commit 2739ff3

Browse files
committed
- version only prints version
1 parent 46e859b commit 2739ff3

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

copasi/CopasiSE/CopasiSE.cpp

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,23 @@ int main(int argc, char *argv[])
218218
bool License;
219219
COptions::getValue("License", License);
220220

221+
if (License)
222+
{
223+
std::cout << CRootContainer::getLicenseTxt() << std::endl;
224+
225+
retcode = 0;
226+
goto finish;
227+
}
228+
229+
bool VersionOnly;
230+
COptions::getValue("Version", VersionOnly);
231+
232+
if (VersionOnly)
233+
{
234+
retcode = 0;
235+
goto finish;
236+
}
237+
221238
COptions::getValue("ReportFile", ReportFileName);
222239

223240
// should a report filename be given, ensure that
@@ -233,13 +250,6 @@ int main(int argc, char *argv[])
233250
COptions::getValue("ImportTaskSpec", ImportTaskSpec);
234251

235252

236-
if (License)
237-
{
238-
std::cout << CRootContainer::getLicenseTxt() << std::endl;
239-
240-
retcode = 0;
241-
goto finish;
242-
}
243253

244254
COptions::getValue("MaxTime", MaxTime);
245255

copasi/commandline/COptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ void COptions::init(C_INT argc, char *argv[])
277277
setValue("ExportIni", Options.ExportIni);
278278
setValue("SedmlTask", Options.SedmlTask);
279279
setValue("PrintSedMLTasks", Options.PrintSedMLTasks);
280-
setValue("Version", Options.PrintSedMLTasks);
280+
setValue("Version", Options.Version);
281281
setValue("ExportTaskSpec", Options.ExportTaskSpec);
282282
setValue("ImportTaskSpec", Options.ImportTaskSpec);
283283

0 commit comments

Comments
 (0)