diff --git a/updater/src/com/intellij/updater/Runner.java b/updater/src/com/intellij/updater/Runner.java index f0b0b7710a6d..dc9ce7af1426 100644 --- a/updater/src/com/intellij/updater/Runner.java +++ b/updater/src/com/intellij/updater/Runner.java @@ -112,6 +112,9 @@ public class Runner { jarFile = resolveJarFile(); } + LOG.info("args: " + Arrays.toString(args)); + LOG.info(".jar: " + jarFile); + if (args.length >= 6 && "create".equals(args[0])) { String oldVersionDesc = args[1]; String newVersionDesc = args[2]; @@ -121,7 +124,6 @@ public class Runner { checkCaseSensitivity(newFolder); - LOG.info("args: " + Arrays.toString(args)); LOG.info("case-sensitive: " + ourCaseSensitiveFs); boolean binary = hasArgument(args, "zip_as_binary"); @@ -182,7 +184,6 @@ public class Runner { checkCaseSensitivity(destDirectory.toString()); - LOG.info("args: " + Arrays.toString(args)); LOG.info("destination: " + destPath + " (" + destDirectory + "), case-sensitive: " + ourCaseSensitiveFs); UpdaterUI ui; @@ -213,6 +214,7 @@ public class Runner { } else { printUsage(); + System.exit(1); } } @@ -312,7 +314,7 @@ public class Runner { LOG.info("Packing JAR file: " + spec.getPatchFile()); ui.startProcess("Packing JAR file '" + spec.getPatchFile() + "'..."); - try (ZipOutputWrapper out = new ZipOutputWrapper(Files.newOutputStream(Paths.get(spec.getPatchFile()))); + try (ZipOutputWrapper out = new ZipOutputWrapper(Files.newOutputStream(Paths.get(spec.getPatchFile()), StandardOpenOption.CREATE_NEW)); ZipInputStream in = new ZipInputStream(Files.newInputStream(Paths.get(spec.getJarFile())))) { ZipEntry e; while ((e = in.getNextEntry()) != null) {