You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Pepijn Van Eeckhoudt (JIRA)" <ji...@apache.org> on 2010/03/15 08:09:27 UTC

[jira] Reopened: (BUILDR-398) FileUtils#sh does not work correctly on windows

     [ https://issues.apache.org/jira/browse/BUILDR-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pepijn Van Eeckhoudt reopened BUILDR-398:
-----------------------------------------


The issue seems to apply to Ruby in general. From the information I could find via google I've come to the conclusion that File.SEPARATOR is always set to '/' regardless of platform. Paths in Ruby are also always '/' separated. This is supposedly so to ease cross-platform portability.

As a result, this patch should be applied for all Ruby implementations; not just JRuby.

> FileUtils#sh does not work correctly on windows
> -----------------------------------------------
>
>                 Key: BUILDR-398
>                 URL: https://issues.apache.org/jira/browse/BUILDR-398
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.3.5
>            Reporter: Pepijn Van Eeckhoudt
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: fileutils_sh.patch
>
>
> the sh method attempts to 'cd' to Dir.pwd before executing the actual command. This does not work correctly on Windows/JRuby 1.4. File::SEPARATOR returns '/' on this platform. When system tries to 'cd' to a path with a '/' on Windows the operation fails. The attached patch ensures the separators are '\' instead.
> Also cd on windows changes the current directory for a particular drive. When changing to another drive the '/d' option should be included. This is also included in the attached patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.