I ran into a strange-looking issue while trying to get a build script (from 3rd party) to work on my setup with Win7 and Cygwin (latest version). The issue can maybe best described with an example bash
script snippet:
foo="/cygdrive/c/svn/Projects/Client Config/Android/Repack/foo/out"
cygpath -w "$foo/play-services-tasks/classes.jar"
bar=`cygpath -w "$foo/play-services-tasks/classes.jar"`
echo $bar
Running that results the following (pay attention to the colon after drive letter):
C:\svn\Projects\Client Config\Android\Repack\foo\out\play-services-tasks\classes.jar
C \svn\Projects\Client Config\Android\Repack\foo\out\play-services-tasks\classes.jar
So, the path (the output of cygpath
) is proper before putting it in a variable, but the variable doesn't anymore contain the colon after the drive letter. That, in turn, makes another script/tool fail when it tries to iterate over space separated paths in a variable. And unfortunately, that tool expects to have the Windows style paths.
Needless to say, I am baffled...
The issue appeared when the build script changed and it may well lack some cygwin compatibility hacks, some of which I already managed to apply, but this one's really nasty. It might be possible to work around the changed parts somehow but I'd rather figure what's the reason for my finding and how to deal with that directly.