This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: batch script execution failing with 255 exit code in cygwin 1.7.28
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 14 Feb 2014 10:23:44 -0500
- Subject: Re: batch script execution failing with 255 exit code in cygwin 1.7.28
- Authentication-results: sourceware.org; auth=none
- References: <CAHDNAGKo6SyTV_1sHsLoq6xR0p8BdT-TQ_9P=WCi+8j2dY7oEA at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
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