Skip to content

Commit

Permalink
Make sure codegen directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek committed Nov 5, 2024
1 parent 31764fc commit 6775a09
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.filesystem.ManagedFileAccess;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.junit.jupiter.api.Assertions;
Expand Down Expand Up @@ -390,8 +391,12 @@ public void testLoad() throws IOException {
public void testGenerate() throws IOException {
load();
PECodeGenerator gen = new PECodeGenerator(ctxt);

gen.setFolder(Utilities.path("[tmp]", "codegen"));

String codeGenFolder = Utilities.path("[tmp]", "codegen");
if (!ManagedFileAccess.csfile(codeGenFolder).exists()) {
ManagedFileAccess.csfile(codeGenFolder).mkdirs();
}
gen.setFolder(codeGenFolder);
gen.setExtensionPolicy(ExtensionPolicy.Complexes);
gen.setNarrative(false);
gen.setMeta(false);
Expand Down

0 comments on commit 6775a09

Please sign in to comment.