Skip to content

Commit 5f78865

Browse files
authored
Merge pull request #69 from ai/patch-1
Fix for empty EXECJS_RUNTIME
2 parents 406b917 + 562c941 commit 5f78865

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)