From 8f07e9bcabe7002c46209df947fa82543a3c4f4a Mon Sep 17 00:00:00 2001 From: Derek Smart Date: Mon, 10 Jun 2024 09:31:38 -0400 Subject: [PATCH] Update GitPathHandler.java --- .../java/org/liquibase/ext/resource/git/GitPathHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/liquibase/ext/resource/git/GitPathHandler.java b/src/main/java/org/liquibase/ext/resource/git/GitPathHandler.java index 8238050..bee2990 100644 --- a/src/main/java/org/liquibase/ext/resource/git/GitPathHandler.java +++ b/src/main/java/org/liquibase/ext/resource/git/GitPathHandler.java @@ -49,9 +49,11 @@ public ResourceAccessor getResourceAccessor(String root) throws IOException { if (Boolean.TRUE.equals(cleanup)) { this.registerShutdown(path); } + if (!path.exists()) { path.mkdirs(); } + try (Repository repository = new RepositoryBuilder().setGitDir(gitPath).build()) { if (repository.getObjectDatabase().exists()) { try (Git git = Git.open(path)) {