mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Don't overwrite the distribution if it's already there.
This commit is contained in:
parent
ba3dd38e90
commit
170cdfce75
1 changed files with 3 additions and 1 deletions
|
@ -138,14 +138,16 @@ public class Main {
|
||||||
String zipOutputDir = DISTRIBUTIONS_DIR + "/" + wrapperVersion;
|
String zipOutputDir = DISTRIBUTIONS_DIR + "/" + wrapperVersion;
|
||||||
Path kobaltJarFile = Paths.get(zipOutputDir,
|
Path kobaltJarFile = Paths.get(zipOutputDir,
|
||||||
getWrapperDir().getPath() + "/" + FILE_NAME + "-" + wrapperVersion + ".jar");
|
getWrapperDir().getPath() + "/" + FILE_NAME + "-" + wrapperVersion + ".jar");
|
||||||
|
boolean downloadedZipFile = false;
|
||||||
if (! Files.exists(localZipFile) || ! Files.exists(kobaltJarFile)) {
|
if (! Files.exists(localZipFile) || ! Files.exists(kobaltJarFile)) {
|
||||||
download(localZipFile.toFile(), wrapperVersion);
|
download(localZipFile.toFile(), wrapperVersion);
|
||||||
|
downloadedZipFile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Extract all the zip files
|
// Extract all the zip files
|
||||||
//
|
//
|
||||||
if (! noOverwrite) {
|
if (! noOverwrite && downloadedZipFile) {
|
||||||
int retries = 0;
|
int retries = 0;
|
||||||
while (retries < 2) {
|
while (retries < 2) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue