From f29ad3e66bf148adcebdfcd3e209c7d855f848e6 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 12 Oct 2021 14:41:24 +0200 Subject: [PATCH] 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. --- lib/execjs/graaljs_runtime.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/execjs/graaljs_runtime.rb b/lib/execjs/graaljs_runtime.rb index 2042fbd..73d22a7 100644 --- a/lib/execjs/graaljs_runtime.rb +++ b/lib/execjs/graaljs_runtime.rb @@ -126,13 +126,13 @@ def available? 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