Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 12d4e1eb828a3356be8f750e901756cdc3543575 1 parent 1ba1ef5
@myabc myabc authored dkubb committed
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'
Please sign in to comment.
Something went wrong with that request. Please try again.