File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,15 @@ pwd_prefix() {
1616  if  is_windows;  then 
1717    #  On Windows, escape backslashes for sed and convert to forward slashes for consistent snapshots
1818    #  This ensures paths like C:\a\b are replaced correctly
19-     #  First get the Windows-style path with backslashes
20-     local  win_path=$( pwd -W |  sed " s#/#\\\\ #g" ) 
21-     #  Then escape the backslashes for sed replacement
22-     echo  $win_path  |  sed ' s#\\#\\\\#g' 
19+     if  [[ " $( uname -s) "   =~  MINGW ]];  then 
20+       #  First get the Windows-style path with backslashes
21+       local  win_path=$( pwd -W |  sed " s#/#\\\\ #g" ) 
22+       #  Then escape the backslashes for sed replacement
23+       echo  $win_path  |  sed ' s#\\#\\\\#g' 
24+     else 
25+       #  Cygwin fallback: use cygpath for Windows style paths
26+       cygpath -w " $( pwd) "   |  sed ' s#\\\\#\\\\\\\\#g' 
27+     fi 
2328  else 
2429    #  On Unix-like systems, escape forward slashes for sed
2530    echo  $( pwd |  sed " s#/#\\ /#g" ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments