mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
commit
5f78865d36
1 changed files with 3 additions and 1 deletions
|
@ -64,7 +64,9 @@ module ExecJS
|
|||
end
|
||||
|
||||
def self.from_environment
|
||||
if name = ENV["EXECJS_RUNTIME"]
|
||||
env = ENV["EXECJS_RUNTIME"]
|
||||
if env && !env.empty?
|
||||
name = env
|
||||
raise RuntimeUnavailable, "#{name} runtime is not defined" unless const_defined?(name)
|
||||
runtime = const_get(name)
|
||||
|
||||
|
|
Loading…
Reference in a new issue