Skip to content

Commit

Permalink
actually check for the existence of the configured Rubinius::LIB_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
unleashed committed Apr 18, 2012
1 parent 4aded3b commit 31c69c5
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions kernel/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,14 @@ def preamble
def system_load_path
@stage = "setting up system load path"

@main_lib = nil

if env_lib = ENV['RBX_LIB']
@main_lib = File.expand_path(env_lib) if File.exists?(env_lib)
end

# Use the env version if it's set.
@main_lib = Rubinius::LIB_PATH unless @main_lib
if env_lib = ENV['RBX_LIB'] and File.exists?(env_lib)
@main_lib = File.expand_path(env_lib)
else
# use configured library path and check its existence
@main_lib = Rubinius::LIB_PATH

unless @main_lib
STDERR.puts <<-EOM
unless File.exists?(@main_lib)
STDERR.puts <<-EOM
Rubinius was configured to find standard library files at:
#{@main_lib}
Expand All @@ -93,7 +90,8 @@ def system_load_path
Set the environment variable RBX_LIB to the directory
containing the Rubinius standard library files.
EOM
EOM
end
end

@main_lib_bin = File.join @main_lib, "bin"
Expand Down

0 comments on commit 31c69c5

Please sign in to comment.