X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48058426.5080307@cisra.canon.com.au> Date: Wed, 16 Apr 2008 14:44:22 +1000 From: Luke Kendall User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Directory existence prevents .exe execution Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com We have the Ici scripting language installed on Windows. Ici expects a directory called "ici" to exist alongside, where various libraries are installedd to provide extra functionality. Unfortunately, under Cygwin, if w try to run the command "ici" we get the error "ici: command not found", because Cygwin chooses to try to execute the directory instead of the .exe: $ /opt/bin/ici /cygdrive/x/bin/script/cfnhdr bash: /opt/bin/ici: is a directory $ ls -ld /opt/bin/ici drwxr-xr-x 1 luke Domain Users 0 Oct 17 2005 /opt/bin/ici $ ls -ld /opt/bin/ici.* -rwxr-xr-x 1 luke Domain Users 233503 Apr 18 2000 /opt/bin/ici.dll -rwxr-xr-x 1 luke Domain Users 24576 Jan 29 2003 /opt/bin/ici.exe I tried naming the ici directory Ici but it made no difference. The directory /opt/bin is mounted like so: $ mount \\samba\syncopt\microsoft.x86.win\bin on /opt/bin type system (textmode,exec) Using binmode doesn't help. Is this a bug, that bash tries to execute a directory even when there's an executable (with an implicit .exe suffix, naturally) of the same name in existence ? If not, can anyone suggest a workaround? I can't just append a .exe to the #!/opt/bin/ici shell wrapper since then the scripts wouldn't run from Unix. Is there a bash option that controls this, maybe (I couldn't see one)? Regards, luke -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/