Skip to content

Commit

Permalink
Force creation of output directory (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
JPercival authored Dec 1, 2023
1 parent 630b521 commit e235ae3
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ protected BaseContentTest(Spreadsheet spreadsheet, FhirVersionEnum fhirVersion)

@BeforeClass
protected void init() throws IOException {
outputPath = Files.createTempDirectory(Path.of(tempPath), "content-test-").toAbsolutePath();
var p = Path.of(tempPath);
if (!p.toFile().exists() && !p.toAbsolutePath().toFile().exists()) {
Files.createDirectories(p);
}

var f = Files.createTempDirectory(p, "content-test-");
outputPath = f.toAbsolutePath();
processor = new Processor();
processor.execute(args());
}
Expand Down Expand Up @@ -168,8 +174,8 @@ protected Path vocabularyPath() {
// Resource helpers

protected <T extends IBaseResource> T resourceAtPath(Class<T> resourceClass, Path resourcePath) {
Objects.requireNonNull(resourcePath, "resourcePath is required");
Objects.requireNonNull(resourceClass, "resourceClass is required");
Objects.requireNonNull(resourcePath, "resourcePath is required");

var file = resourcePath.toFile();
if (!file.exists()) {
Expand Down

0 comments on commit e235ae3

Please sign in to comment.