Skip to content

Commit

Permalink
Only warn if $VERBOSE
Browse files Browse the repository at this point in the history
* If the GraalJSRuntime is not used it is not necessarily an issue,
  as it e.g. fall back to an ExternalRuntime like node.
  • Loading branch information
eregon committed Oct 12, 2021
1 parent c6f4f6e commit db2490c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/execjs/graaljs_runtime.rb
Expand Up @@ -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

Expand Down

0 comments on commit db2490c

Please sign in to comment.