Skip to content

Commit 7b32fc2

Browse files
committed
fix: exception with repo path normalization
1 parent d9f51ef commit 7b32fc2

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

  • Snapshots/TraceDiff/src/main/java/com/github/gilesi/tracediff

Snapshots/TraceDiff/src/main/java/com/github/gilesi/tracediff/Main.java

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ private static void processArguments(String[] args) throws IOException {
5757
return;
5858
}
5959

60-
Path traceOldResultsCSVPath = traceOldLibVersionXmlPath.getParent().getParent().resolve("results.csv");
61-
String resolvedOldCodeRepoPath = Files.readAllLines(traceOldResultsCSVPath).get(1).split("\\|")[0];
60+
String resolvedOldCodeRepoPath = "UNKNOWN_PATH_PLACEHOLDER";
61+
try {
62+
Path traceOldResultsCSVPath = traceOldLibVersionXmlPath.getParent().getParent().resolve("results.csv");
63+
resolvedOldCodeRepoPath = Files.readAllLines(traceOldResultsCSVPath).get(1).split("\\|")[0];
64+
} catch (Exception e) {
65+
66+
}
6267

6368
Path traceNewLibVersionXmlPath = Path.of(traceNewLibVersionXmlFolder);
6469

@@ -68,8 +73,14 @@ private static void processArguments(String[] args) throws IOException {
6873
return;
6974
}
7075

71-
Path traceNewResultsCSVPath = traceNewLibVersionXmlPath.getParent().getParent().resolve("results.csv");
72-
String resolvedNewCodeRepoPath = Files.readAllLines(traceNewResultsCSVPath).get(1).split("\\|")[0];
76+
String resolvedNewCodeRepoPath = "UNKNOWN_PATH_PLACEHOLDER";
77+
try {
78+
Path traceNewResultsCSVPath = traceNewLibVersionXmlPath.getParent().getParent().resolve("results.csv");
79+
resolvedNewCodeRepoPath = Files.readAllLines(traceNewResultsCSVPath).get(1).split("\\|")[0];
80+
} catch (Exception e) {
81+
82+
}
83+
7384

7485
logger.info("OLD REPO: " + resolvedOldCodeRepoPath);
7586
logger.info("NEW REPO: " + resolvedNewCodeRepoPath);

0 commit comments

Comments
 (0)