Skip to content

Commit

Permalink
fix: YamlScanner git clone execution
Browse files Browse the repository at this point in the history
  • Loading branch information
wurstbrot committed Jan 11, 2024
1 parent 0670d68 commit fd87771
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void initiate() throws IOException, GitAPIException {
}
}


private void gitClone() throws GitAPIException {
File yamlGitTargetPathFile = new File(yamlGitTargetPath);
if (yamlGitTargetPathFile.exists()) {
Expand Down Expand Up @@ -96,7 +97,14 @@ public File getSkeletonYaml() throws IOException, GitAPIException {
}

private boolean isGit() {
return yamlGitUrl != null && !yamlGitUrl.isEmpty();
if (yamlGitUrl == null || yamlGitUrl.isEmpty()) {
return false;
}
if (!new File(yamlGitTargetPath).exists()) {
return true;
}

return enforceGitCloneIfTargetFolderExists;
}

private String getYamlSkeletonFilePath() {
Expand Down

0 comments on commit fd87771

Please sign in to comment.