Sha256: 42c36eb4e0fe22ae4efb2705cc6387387eaf51f30bd531b07f886c8d72aa20dc
Contents?: true
Size: 564 Bytes
Versions: 212
Compression:
Stored size: 564 Bytes
Contents
# frozen_string_literal: true module EacRubyUtils module Envs class Command module Envvars def envvar(name, value) duplicate_by_extra_options(envvars: envvars.merge(name => value)) end private def append_envvars(command) e = envvars.map { |k, v| "#{Shellwords.escape(k)}=#{Shellwords.escape(v)}" }.join(' ') e.present? ? "#{e} #{command}" : command end def envvars extra_options[:envvars] ||= {}.with_indifferent_access end end end end end
Version data entries
212 entries across 212 versions & 4 rubygems