I'm using Windows XP with the latest version of Cygwin. If I set the following environment variable in my Windows system
JBOSS_HOME=C:/Program Files/jboss-4.2.3.GA
and then fire up Cygwin, I'm unable to switch to the inherited $JBOSS_HOME directory.
$ cd $JBOSS_HOME
cygwin warning:
MS-DOS style path detected: C:/Program
Preferred POSIX equivalent is: /cygdrive/c/Program
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
-bash: cd: C:/Program: No such file or directory
Is it possible to define my system variable once in the Windows environment and then get Cygwin to interpret it so that I don't get this "No such file or directory" warning?
You could do one of two things...
export JBOSS_HOME=$( cygpath "$JBOSS_HOME" )
or
cd "$JBOSS_HOME"
Note that you might still get that same "cygwin warning" in this case. In order to make that go away, you need to add nodosfilewarning
to your CYGWIN var as the warning advises. You can do that by adding this in your .bashrc file...
export CYGWIN="${CYGWIN} nodosfilewarning"
I am using Eclispse with ShellED plugins,
I got the same notification, not knowing the accurate configuration,
I just add the export value into the script
'#!/bin/bash'
export CYGWIN="${CYGWIN} nodosfilewarning"
echo hello
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With