Browse files

[all] Correctly identify Windows on JRuby

* Identifying Windows correctly is essential for ensuring various Rake
  tasks work as expected, implicit sudo is not used and the right
  commands are passed to cmd.exe. This patch should help with install
  problems running JRuby on Windows.

Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
  • Loading branch information...
1 parent 1ba1ef5 commit 12d4e1eb828a3356be8f750e901756cdc3543575 @myabc myabc committed with dkubb Oct 31, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 Rakefile
View
2 Rakefile
@@ -2,7 +2,7 @@ require 'pathname'
ROOT = Pathname(__FILE__).dirname.expand_path
JRUBY = RUBY_PLATFORM =~ /java/
-WINDOWS = Gem.win_platform?
+WINDOWS = Gem.win_platform? || (JRUBY && ENV_JAVA['os.name'] =~ /windows/i)
SUDO = (WINDOWS || JRUBY) ? '' : ('sudo' unless ENV['SUDOLESS'])
require ROOT + 'lib/dm-migrations/version'

0 comments on commit 12d4e1e

Please sign in to comment.