This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Errorlevel
- From: "Gluszczak, Glenn" <Glenn dot Gluszczak at dell dot com>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Thu, 22 Sep 2016 19:46:50 +0000
- Subject: RE: Errorlevel
- Authentication-results: sourceware.org; auth=none
- References: <91DCAC3CB99C724EB365BB64677FBE7B0BF747@MX204CL04.corp.emc.com>
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