From commits-return-71969-archive-asf-public=cust-asf.ponee.io@commons.apache.org Sat Jan 25 14:02:56 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 652F318061A for ; Sat, 25 Jan 2020 15:02:56 +0100 (CET) Received: (qmail 84091 invoked by uid 500); 25 Jan 2020 14:02:55 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 84082 invoked by uid 99); 25 Jan 2020 14:02:55 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jan 2020 14:02:55 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 87766819F5; Sat, 25 Jan 2020 14:02:55 +0000 (UTC) Date: Sat, 25 Jan 2020 14:02:55 +0000 To: "commits@commons.apache.org" Subject: [commons-compress] branch master updated: OK, so tar fails. Try to figure out why. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <157996097546.11608.6079034963265578664@gitbox.apache.org> From: bodewig@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: commons-compress X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 560f243b97c2342f3569758bf0a51e5cb3f2c326 X-Git-Newrev: 57464b2f19e0cb048d549fc6f7682ce324bcf9ad X-Git-Rev: 57464b2f19e0cb048d549fc6f7682ce324bcf9ad X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. bodewig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git The following commit(s) were added to refs/heads/master by this push: new 57464b2 OK, so tar fails. Try to figure out why. 57464b2 is described below commit 57464b2f19e0cb048d549fc6f7682ce324bcf9ad Author: Stefan Bodewig AuthorDate: Sat Jan 25 15:02:33 2020 +0100 OK, so tar fails. Try to figure out why. --- .../org/apache/commons/compress/archivers/tar/SparseFilesTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java b/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java index 028de5f..8aa8adf 100644 --- a/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/tar/SparseFilesTest.java @@ -233,10 +233,11 @@ public class SparseFilesTest extends AbstractTestCase { } private InputStream extractTarAndGetInputStream(File tarFile, String sparseFileName) throws IOException, InterruptedException { - Runtime runtime = Runtime.getRuntime(); - Process process = runtime.exec("tar -xf " + tarFile.getPath() + " -C " + resultDir.getPath()); + ProcessBuilder pb = new ProcessBuilder("tar", "-xf", tarFile.getPath(), "-C", resultDir.getPath()); + pb.redirectErrorStream(true); + Process process = pb.start(); // wait until the extract finishes - assertEquals(0, process.waitFor()); + assertEquals(new String(IOUtils.toByteArray(process.getInputStream())), 0, process.waitFor()); for (File file : resultDir.listFiles()) { if (file.getName().equals(sparseFileName)) {