Fix the "--output-file" option
This commit is contained in:
parent
e02d20c34a
commit
0d5c5957a5
|
@ -97,19 +97,12 @@ public class Main {
|
||||||
|
|
||||||
if (cmd.hasOption("list-trackers")) {
|
if (cmd.hasOption("list-trackers")) {
|
||||||
System.out.println(VulnerabilityEvidenceTrackerFactory.getTrackersList());
|
System.out.println(VulnerabilityEvidenceTrackerFactory.getTrackersList());
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else if (cmd.hasOption("input-file")) {
|
||||||
if (cmd.hasOption("input-file")) {
|
|
||||||
String i = cmd.getOptionValue("input-file");
|
String i = cmd.getOptionValue("input-file");
|
||||||
collectVulnEvidence(i);
|
collectVulnEvidence(i);
|
||||||
}
|
}
|
||||||
if (cmd.hasOption("output-file")) {
|
else {
|
||||||
String o = cmd.getOptionValue("output-file");
|
|
||||||
generateCsv(o);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!cmd.hasOption("input-file") && !cmd.hasOption("output-file")) {
|
|
||||||
String projectName = null;
|
String projectName = null;
|
||||||
String repoType = null;
|
String repoType = null;
|
||||||
String repoPath = null;
|
String repoPath = null;
|
||||||
|
@ -154,6 +147,11 @@ public class Main {
|
||||||
throw new ParseException("The 'tracker-type' parameter is not specified");
|
throw new ParseException("The 'tracker-type' parameter is not specified");
|
||||||
}
|
}
|
||||||
collect(projectName, repoType, repoPath, cveId, fixCommit, trackerType);
|
collect(projectName, repoType, repoPath, cveId, fixCommit, trackerType);
|
||||||
|
|
||||||
|
if (cmd.hasOption("output-file")) {
|
||||||
|
String o = cmd.getOptionValue("output-file");
|
||||||
|
generateCsv(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ParseException e) {
|
catch (ParseException e) {
|
||||||
|
|
Loading…
Reference in New Issue