Skip to content

Commit

Permalink
CI failed due to no modules directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ipsi committed Sep 12, 2022
1 parent afca89d commit 795203b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/test/java/name/ipsi/project/fwbp/MainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ class MainTest {
void testAdventure() throws Exception {
Main.configureLogging();
var outputPath = Path.of("modules");
Files.walkFileTree(outputPath, new SimpleFileVisitor<>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
Files.delete(file);
return FileVisitResult.CONTINUE;
}
});
// If it exists but isn't a directory... bugger.
if (Files.isDirectory(outputPath)) {
Files.walkFileTree(outputPath, new SimpleFileVisitor<>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
Files.delete(file);
return FileVisitResult.CONTINUE;
}
});
}

var filePath = System.getenv("PDF_FILE_PATH");
if (filePath == null) {
Expand Down

0 comments on commit 795203b

Please sign in to comment.