Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0BF519F0C for ; Thu, 21 Apr 2016 21:18:24 +0000 (UTC) Received: (qmail 72026 invoked by uid 500); 21 Apr 2016 21:18:24 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 71983 invoked by uid 500); 21 Apr 2016 21:18:24 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 71973 invoked by uid 99); 21 Apr 2016 21:18:24 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Apr 2016 21:18:24 +0000 Received: from asf-bz1-us-mid.priv.apache.org (nat1-us-mid.apache.org [23.253.172.122]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPS id 66C621A0052 for ; Thu, 21 Apr 2016 21:18:24 +0000 (UTC) Received: by asf-bz1-us-mid.priv.apache.org (ASF Mail Server at asf-bz1-us-mid.priv.apache.org, from userid 33) id 416A560642; Thu, 21 Apr 2016 21:18:23 +0000 (UTC) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: [Bug 58898] ANT wrapper script can not handle double-quote or backslash characters in arguments Date: Thu, 21 Apr 2016 21:18:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Wrapper scripts X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwadamson@gmail.com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: 1.9.7 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bz.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 https://bz.apache.org/bugzilla/show_bug.cgi?id=58898 --- Comment #5 from jwadamson@gmail.com --- Thank you for the example. I think the 1.9.6 behavior in your case was objectively incorrect. It worked out to the right answer, but for the wrong reasons. '-Dbranch.command="co' -r '"' In /bin/sh, quoting does not nest. So the example command line has 3 separate arguments passed to ant: `-Dbranch.commmand="co` `-r` `"` (a literal double-quote) The ant script in 1.9.6 was smushing these back together as (quoting the space between each original argument) `"-Dbranch.command="co" "-r" """`. /bin/sh processing then interprets this mess as a single argument in the exec command (with some spurious empty strings concatenated into the value): `-Dbranch.command=co -r ` The ant script in 1.9.7 keeps those original 3 arguments separate and causes the error about the `-r` argument. -- You are receiving this mail because: You are the assignee for the bug.