mirror of
https://github.com/rails/execjs
synced 2023-03-27 23:21:20 -04:00
Fix for empty EXECJS_RUNTIME
This commit is contained in:
parent
406b91741b
commit
562c941e1e
1 changed files with 3 additions and 1 deletions
|
@ -64,7 +64,9 @@ module ExecJS
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.from_environment
|
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)
|
raise RuntimeUnavailable, "#{name} runtime is not defined" unless const_defined?(name)
|
||||||
runtime = const_get(name)
|
runtime = const_get(name)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue