Skip to content

Commit 562c941

Browse files
authored
Fix for empty EXECJS_RUNTIME
1 parent 406b917 commit 562c941

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/execjs/runtimes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ def self.best_available
6464
end
6565

6666
def self.from_environment
67-
if name = ENV["EXECJS_RUNTIME"]
67+
env = ENV["EXECJS_RUNTIME"]
68+
if env && !env.empty?
69+
name = env
6870
raise RuntimeUnavailable, "#{name} runtime is not defined" unless const_defined?(name)
6971
runtime = const_get(name)
7072

0 commit comments

Comments
 (0)