diff --git a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java index e5ef2062..8b9441ef 100644 --- a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java +++ b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java @@ -138,14 +138,16 @@ public class Main { String zipOutputDir = DISTRIBUTIONS_DIR + "/" + wrapperVersion; Path kobaltJarFile = Paths.get(zipOutputDir, getWrapperDir().getPath() + "/" + FILE_NAME + "-" + wrapperVersion + ".jar"); + boolean downloadedZipFile = false; if (! Files.exists(localZipFile) || ! Files.exists(kobaltJarFile)) { download(localZipFile.toFile(), wrapperVersion); + downloadedZipFile = true; } // // Extract all the zip files // - if (! noOverwrite) { + if (! noOverwrite && downloadedZipFile) { int retries = 0; while (retries < 2) { try {