# Path is in relative form. Resolve relative directories in Unix form
# *BEFORE* converting to Win32 form otherwise paths like
# '../../../cygdrive/c/windows' will not be resolved.
- my $cur_dir = `pwd -L`;
+
+ my $cur_dir;
+ # MSys shell has built-in command.
+ if($^O eq 'msys') {
+ $cur_dir = `bash -c 'pwd -L'`;
+ }
+ else {
+ $cur_dir = `pwd -L`;
+ }
if($? != 0) {
warn "Can't determine current working directory.\n";
return undef;
# Path is empty string. Return current directory.
# Empty string processed correctly by 'cygpath'.
- chomp($path = `pwd -L`);
+ # MSys shell has built-in command.
+ if($^O eq 'msys') {
+ chomp($path = `bash -c 'pwd -L'`);
+ }
+ else {
+ chomp($path = `pwd -L`);
+ }
if($? != 0) {
warn "Can't determine Unix-style current working directory.\n";
return undef;
# Path in relative form. Resolve relative directories in Unix form
# *BEFORE* converting to Win32 form otherwise paths like
# '../../../cygdrive/c/windows' will not be resolved.
- my $cur_dir = `pwd -L`;
+
+ my $cur_dir;
+ # MSys shell has built-in command.
+ if($^O eq 'msys') {
+ $cur_dir = `bash -c 'pwd -L'`;
+ }
+ else {
+ $cur_dir = `pwd -L`;
+ }
if($? != 0) {
warn "Can't determine current working directory.\n";
return undef;