dweiss commented on issue #1390: LUCENE-9266 remove gradle wrapper jar from source URL: https://github.com/apache/lucene-solr/pull/1390#issuecomment-606832106 Realistically, I don't think anybody will. Rather, they'll retry the script. If something doesn't work with move it's probably fatal anyway. On Tue, Mar 31, 2020 at 9:34 PM Mike Drob <notificati...@github.com> wrote: > > @madrob commented on this pull request. > > ________________________________ > > In buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java: > > > + File temp = Files.createTempFile("gradle-wrapper", null).toFile(); > + try (ReadableByteChannel in = Channels.newChannel(url.openStream()); > + FileOutputStream out = new FileOutputStream(temp)) { > + out.getChannel().transferFrom(in, 0, maxSize); > + } > + > + try (FileInputStream fis = new FileInputStream(temp)) { > + MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); > + > + // Convert binary digest to hex checksum value > + // This will strip leading zeroes, deal with that when we need to > + String sha256sum = new BigInteger(1, sha256.digest(fis.readAllBytes())).toString(16); > + > + if (args[2].equals(sha256sum)) { > + if (!temp.renameTo(jar)) { > + System.err.println("Failed renaming wrapper jar, leaving download at " + temp); > > The user might be able to manually move it into place since we've already validated the checksum. I'll update the error. > > — > You are receiving this because your review was requested. > Reply to this email directly, view it on GitHub, or unsubscribe.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org