1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00

Only warn if $VERBOSE

* If the GraalJSRuntime is not used it is not necessarily an issue,
  as it e.g. fall back to an ExternalRuntime like node.
This commit is contained in:
Benoit Daloze 2021-10-12 14:41:24 +02:00
parent 05476fab17
commit f29ad3e66b

View file

@ -126,13 +126,13 @@ module ExecJS
end
unless defined?(Polyglot::InnerContext)
warn "TruffleRuby #{RUBY_ENGINE_VERSION} does not have support for inner contexts, use a more recent version", uplevel: 0
warn "TruffleRuby #{RUBY_ENGINE_VERSION} does not have support for inner contexts, use a more recent version", uplevel: 0 if $VERBOSE
return @available = false
end
unless Polyglot.languages.include? "js"
warn "The language 'js' is not available, you likely need to `export TRUFFLERUBYOPT='--jvm --polyglot'`", uplevel: 0
warn "Note that you need TruffleRuby+GraalVM and not just the TruffleRuby standalone to use #{self.class}", uplevel: 0
warn "The language 'js' is not available, you likely need to `export TRUFFLERUBYOPT='--jvm --polyglot'`", uplevel: 0 if $VERBOSE
warn "Note that you need TruffleRuby+GraalVM and not just the TruffleRuby standalone to use #{self.class}", uplevel: 0 if $VERBOSE
return @available = false
end