This commit is contained in:
Phillip Webb
2020-07-22 17:25:04 -07:00
parent 217b2eff89
commit d2a7808098
4 changed files with 31 additions and 26 deletions

View File

@@ -69,8 +69,10 @@ final class LocalHttpClientTransport extends HttpClientTransport {
private static String socketFilePath(Environment environment) {
String host = environment.get(DOCKER_HOST);
return (host != null && host.startsWith(UNIX_SOCKET_PREFIX)) ? host.substring(UNIX_SOCKET_PREFIX.length())
: host;
if (host != null && host.startsWith(UNIX_SOCKET_PREFIX)) {
return host.substring(UNIX_SOCKET_PREFIX.length());
}
return host;
}
/**

View File

@@ -76,7 +76,7 @@ public class ZipFileTarArchive implements TarArchive {
private void assertArchiveHasEntries(File jarFile) {
try (ZipFile zipFile = new ZipFile(jarFile)) {
Assert.state(zipFile.getEntries().hasMoreElements(), "File '" + jarFile.toString()
Assert.state(zipFile.getEntries().hasMoreElements(), () -> "File '" + jarFile
+ "' is not compatible with buildpacks; ensure jar file is valid and launch script is not enabled");
}
catch (IOException ex) {