buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pepijn Van Eeckhoudt (JIRA)" <>
Subject [jira] Commented: (BUILDR-398) FileUtils#sh does not work correctly on windows
Date Sun, 14 Mar 2010 20:25:27 GMT


Pepijn Van Eeckhoudt commented on BUILDR-398:

It's a bit old but this discussion ( seems to conclude
that Ruby will use forward slashes regardless of platform and that a gsub should be used when
interacting with external applications. So basically what I did in the attached patch.

> FileUtils#sh does not work correctly on windows
> -----------------------------------------------
>                 Key: BUILDR-398
>                 URL:
>             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

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

View raw message