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)) {