http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2101
*** shadow/2101 Sun Jun 10 15:27:46 2001 --- shadow/2101.tmp.24122 Sun Jun 10 15:27:46 2001 *************** *** 0 **** --- 1,41 ---- + +============================================================================+ + | run.bat does not detect Ant directory | + +----------------------------------------------------------------------------+ + | Bug #: 2101 Product: Ant | + | Status: NEW Version: 1.3 | + | Resolution: Platform: PC | + | Severity: Normal OS/Version: Windows 9x | + | Priority: Other Component: Wrapper scripts | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The run.bat script attempts to locate the Ant directory if the ANT_HOME + variable is not set. First it checks "%SystemDrive%\Program Files\ant" and + then it checks "%SystemDrive%\ant". + + There are two problems with the way it is implemented in run.bat: + + 1. Attempting to detect a directory using this syntax fails on Windows 9x: + + if not exist "%SystemDrive%\Program Files\ant" ... + + To detect a directory, you have to append \nul to the end of the path: + + if not exist "%SystemDrive%\Program Files\ant\nul" ... + + 2. (a) The SystemDrive variable is not normally set on Windows 9x, and forcing + the user to set it defeats the purpose of automatically checking for the Ant + directory when ANT_HOME is not set; (b) programs can easily be installed + on drives other than the system drive, so there's little reason to use that + variable even if it were set. + + It would be better to check the C: drive explicitly, since that's where + 99% of people put their program files, and the other 1% can just set + ANT_HOME: + + if not exist "C:\Program Files\ant\nul" ... \ No newline at end of file
