Sha256: 0b9acf14571777f38b56109b3644133f1d095181e9021a21e8e7d774328a6d29
Contents?: true
Size: 650 Bytes
Versions: 11
Compression:
Stored size: 650 Bytes
Contents
# frozen_string_literal: true require 'opal/paths' require 'opal/cli_runners/system_runner' require 'shellwords' module Opal module CliRunners # Gjs is GNOME's JavaScript runtime based on Mozilla SpiderMonkey class Gjs def self.call(data) exe = ENV['GJS_PATH'] || 'gjs' opts = Shellwords.shellwords(ENV['GJS_OPTS'] || '') SystemRunner.call(data) do |tempfile| [exe, *opts, tempfile.path, *data[:argv]] end rescue Errno::ENOENT raise MissingGjs, 'Please install Gjs to be able to run Opal scripts.' end class MissingGjs < RunnerError end end end end
Version data entries
11 entries across 11 versions & 1 rubygems