Skip to content

Commit

Permalink
don't use spring if running on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbrdo committed Feb 6, 2016
1 parent 514dc0f commit e98ea1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/spring/binstub.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
require 'rbconfig'

command = File.basename($0)
bin_path = File.expand_path("../../../bin/spring", __FILE__)

if command == "spring"
load bin_path
else
disable = ENV["DISABLE_SPRING"]
not_windows = !(RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)

if disable.nil? || disable.empty? || disable == "0"
if not_windows && (disable.nil? || disable.empty? || disable == "0")
ARGV.unshift(command)
load bin_path
end
Expand Down

0 comments on commit e98ea1b

Please sign in to comment.