In cygwin, in order to remove /cygdrive
prefix in the paths, I did a mount like this -
mount -c /
after restarting cygwin, when I say pwd
- it gives me something like - /c/Work/shared/imply-1.1.1
[actually per windows c:\Work\shared\imply-1.1.1
]
and now I have a perl script that I am running using cygwin and I see an error ... something like - Error: Cannot find module 'C:\c\Work\shared\imply-1.1.1\dist\pivot\bin\pivot'
that additional /c/
which is a drive notion returned from cygwin is causing above error (at least one way of looking at it).
Any idea on how to get rid of that ?
Update: To give a better context to the above issue. Here is what is happening - There is a script file, whose contents are as follows -
#!/bin/bash -eu
if [ "$#" -gt 1 ]
then
echo "usage: $0 [conf-dir]" >&2
exit 1
fi
PWD="$(pwd)"
WHEREAMI="$(dirname "$0")"
if [ "$#" -lt 1 ] || [ "x$1" = "x" ]
then
CONFDIR="$WHEREAMI"/../conf
else
CONFDIR="$1"
fi
CONFDIR="$(cd "$CONFDIR" && pwd)/pivot"
WHEREAMI="$(cd "$WHEREAMI" && pwd)"
When I echo the contents of the CONFDIR and WHEREAMI, I get the following -
C:\cygdrive\c\Work\shared\imply-1.1.1\conf\pivot
C:\cygdrive\c\Work\shared\imply-1.1.1\bin\
But the ${pwd} paths were supposed to be resolved as "c:\Work....."
So what I am doing wrong in cygwin?