Method: MRuby::Build.mruby_config_path

Defined in:
ext/enterprise_script_service/mruby/lib/mruby/build.rb

.mruby_config_pathObject



56
57
58
59
60
61
62
63
64
65
# File 'ext/enterprise_script_service/mruby/lib/mruby/build.rb', line 56

def mruby_config_path
  path = ENV['MRUBY_CONFIG'] || ENV['CONFIG']
  if path.nil? || path.empty?
    path = "#{MRUBY_ROOT}/build_config/default.rb"
  elsif !File.file?(path) && !Pathname.new(path).absolute?
    f = "#{MRUBY_ROOT}/build_config/#{path}.rb"
    path = File.exist?(f) ? f : File.extname(path).empty? ? f : path
  end
  path
end