delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/14/10:24:11

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=TnM1jPYKcCAFigOitsMJz4Y6q0CMU8fw0QGiw19yvnv1qkiWdiSZ0
u6WAnQszCmAiaL+SdsQtaaEPlUhL9obg17f+79nm2N2jl7PTWDIMXxMKSviiCdIS
wxZxV5njga91lSbQivoMJv5XINp9f0jOpotofF0i/U6INEL5mwQc04=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=sY1GPBzKJd+4kNz/HGLRiaIwQuQ=; b=TjgDuzJaElzlBbvre7pqy4/W59SD
pOe6u2NK3Q85sE5JEhYMBIJp7moscHJa3bE0q0kvT0Bx5W+8aA9+DWLwywjkAlGg
+4Q8PuZgQvI4YDA3ghdClzwuE0q/MOtcE33z4l+4MLddCjRihLnyfk2MSK9eQaF2
1dACO8G7ewLjvYk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,WEIRD_QUOTING autolearn=ham version=3.3.2
X-HELO: mho-02-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1+Ite1UbjNfnekWh3Kx0ihF
Date: Fri, 14 Feb 2014 10:23:44 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: batch script execution failing with 255 exit code in cygwin 1.7.28
Message-ID: <20140214152344.GA1191@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAHDNAGKo6SyTV_1sHsLoq6xR0p8BdT-TQ_9P=WCi+8j2dY7oEA AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAHDNAGKo6SyTV_1sHsLoq6xR0p8BdT-TQ_9P=WCi+8j2dY7oEA@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)

On Fri, Feb 14, 2014 at 12:10:00PM +0530, Prakash Babu wrote:
>Hi ,
>
>
>I use Cygwin to execute batch scripts on remote windows hosts using ssh.
>
>The batch script execution started failing with the latest cygwin
>version 1.7.28.
>
>The exit code thrown is 255 and batch script is not able to process
>the command line arguments.
>
>When I try to print the command line argument(%1)  its printing both
>the argument name and value.
>
>This was working fine with Cygwin 1.7.27 and  looks to be regression in 1.7.28
>
>
>eg. Batch script (test.bat)
>@echo off
>:setArgs
>if ""%1""=="""" goto doneSetArgs
>set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
>echo %1===
>echo %2===
>shift
>shift
>goto setArgs
>:doneSetArgs
>
>
>Cygwin.1.7.27 the output of the script would be
>#./test.bat OS=Win
>OS===
>Win===
>
>Cygwin.1.7.28 the output of the script is
>#./test.bat OS=Win
>"OS=Win"===
>===

Yep.  At a user's request we now force a " around parameters which are passed to
Windows programs like we do for parameters with spaces.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019