Browse Source

bug ID 32069: resetting an undefined env variable changes the errorlevel.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@382808 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 19 years ago
parent
commit
9503e68fba
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/script/ant.bat

+ 10
- 1
src/script/ant.bat View File

@@ -1,6 +1,6 @@
@echo off

REM Copyright 2001,2004-2005 The Apache Software Foundation
REM Copyright 2001,2004-2006 The Apache Software Foundation
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
@@ -14,6 +14,12 @@ REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

REM This is an inordinately troublesome piece of code, particularly because it
REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x
REM support, things would be much easier, but sadly, it is not yet time.
REM Be cautious about editing this, and only add WinNT specific stuff in code that
REM only runs on WinNT.

if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"

if "%OS%"=="Windows_NT" @setlocal
@@ -149,7 +155,10 @@ set ANT_ERROR=%err100%%err10%%err1%
for %%i in (1 10 100) do set err%%i=

:end
rem bug ID 32069: resetting an undefined env variable changes the errorlevel.
set _JAVACMD=DUMMY_VAL
set _JAVACMD=
set ANT_CMD_LINE_ARGS=DUMMY_VAL
set ANT_CMD_LINE_ARGS=

rem Set the return code if we are not in NT. We can only set


Loading…
Cancel
Save