Sha256: 6f952dd1192766c33a22f8840a521faf94d4d10789f3044b26e3dcaf46b8517d
Contents?: true
Size: 681 Bytes
Versions: 33
Compression:
Stored size: 681 Bytes
Contents
# frozen_string_literal: true require 'opal/paths' require 'opal/cli_runners/system_runner' module Opal module CliRunners class Nashorn def self.call(data) # Allow to change path if using GraalVM, see: # https://github.com/graalvm/graaljs/blob/master/docs/user/NashornMigrationGuide.md#launcher-name-js exe = ENV['NASHORN_PATH'] || 'jjs' SystemRunner.call(data) do |tempfile| [exe, tempfile.path, *data[:argv]] end rescue Errno::ENOENT raise MissingNashorn, 'Please install JDK or GraalVM to be able to run Opal scripts.' end class MissingNashorn < RunnerError end end end end
Version data entries
33 entries across 33 versions & 1 rubygems