From 5d36aa74a00bed3cfa4398e417cb81e4603cd070 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 17 May 2017 09:07:51 -0400 Subject: [PATCH] add more fields to ThreadedCommand --- lib/rscons/threaded_command.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/rscons/threaded_command.rb b/lib/rscons/threaded_command.rb index b24e29c..323212b 100644 --- a/lib/rscons/threaded_command.rb +++ b/lib/rscons/threaded_command.rb @@ -18,11 +18,23 @@ module Rscons # output if the Environment's echo mode is :short. attr_reader :short_description + # @return [Hash] + # Environment Hash to pass to Kernel#system. + attr_reader :system_env + + # @return [Hash] + # Options Hash to pass to Kernel#system. + attr_reader :system_options + # @return [Hash] # Field for Rscons to store the build operation while this threaded # command is executing. attr_accessor :build_operation + # @return [Thread] + # The thread waiting on this command to terminate. + attr_accessor :thread + # Create a ThreadedCommand object. # # @param command [Array] @@ -35,10 +47,16 @@ module Rscons # @option options [String] :short_description # Short description of the command. This will be printed to standard # output if the Environment's echo mode is :short. + # @option options [Hash] :system_env + # Environment Hash to pass to Kernel#system. + # @option options [Hash] :system_options + # Options Hash to pass to Kernel#system. def initialize(command, options = {}) @command = command @builder_info = options[:builder_info] @short_description = options[:short_description] + @system_env = options[:system_env] + @system_options = options[:system_options] end end