X-Recipient: archive-cygwin@delorie.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:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; q=dns; s=default; b=DeKliCOu2tU7YlGDlfnE8i52ZbXMO
	w4G8NDPEAobknnHvSdHxwe9Vf2uFm1otjapU71Ux07GfYR5Bl7BUoUf6Fwe8Qkm4
	vVs5ma+9kNRmuBRbnM2V/4TNBwTvwQPiJkRJGiHloY0mZcoklQFFvd3Y/yUC3cAc
	mlb7KvFo782mYQ=
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:from:to:subject:date:message-id:references
	:in-reply-to:content-type:content-transfer-encoding
	:mime-version; s=default; bh=jX4Yyhq1M9sGuX1zyGp0+oxPUzI=; b=ZYm
	N7mAMy8UppB9NP4JdCXcg8O0Or9wcwdeSEhebqZ3s1/PuTpkHiJ+3mjaanTVwIHS
	DcNDHIrrax/xcZRhID3B43M5Y4mKDolpMn2MbofKY23y/91JaaVQyK868nxMilB0
	79/Theb1NkKcQwKaeeoC7C5zBKKzkMhdjeeUCBNQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=rights, Administrator, corporation, reserved
X-HELO: esa3.dell-outbound.iphmx.com
From: "Gluszczak, Glenn" <Glenn.Gluszczak@dell.com>
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd54.lss.emc.com u8MJkvPb006224
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd54.lss.emc.com u8MJkvPb006224
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: RE: Errorlevel
Date: Thu, 22 Sep 2016 19:46:50 +0000
Message-ID: <91DCAC3CB99C724EB365BB64677FBE7B0BF7A0@MX204CL04.corp.emc.com>
References: <91DCAC3CB99C724EB365BB64677FBE7B0BF747@MX204CL04.corp.emc.com>
In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B0BF747@MX204CL04.corp.emc.com>
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
X-Sentrion-Hostname: mailusrhubprd54.lss.emc.com
X-RSA-Classifications: public
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u8MJlSf7011877


Sorry it's a Windows defect.  Builtin CMD echo does not set an errorlevel.

Glenn

-----Original Message-----
From: Gluszczak, Glenn 
Sent: Thursday, September 22, 2016 2:48 PM
To: 'cygwin@cygwin.com'
Subject: Errorlevel

Is this a known defect?  The errorlevel of the ls command is passed to the echo.

$ cmd
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\cygwin64\home\Administrator>del c:\tmp\hello del c:\tmp\hello Could Not Find c:\tmp\hello

C:\cygwin64\home\Administrator>ls foo
ls foo
ls: cannot access 'foo': No such file or directory

C:\cygwin64\home\Administrator>echo hello > c:\tmp\hello echo hello > c:\tmp\hello

C:\cygwin64\home\Administrator>echo %errorlevel% echo %errorlevel%
2

C:\cygwin64\home\Administrator>del c:\tmp\hello del c:\tmp\hello

C:\cygwin64\home\Administrator>echo hello > c:\tmp\hello echo hello > c:\tmp\hello

C:\cygwin64\home\Administrator>echo %errorlevel% echo %errorlevel%
0


--
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


